diff --git a/run.sh b/run.sh index 5556111..ba76a59 100755 --- a/run.sh +++ b/run.sh @@ -18,6 +18,7 @@ fi # replace containers if $CONTAINER_RUNTIME inspect --type container synapse 1> /dev/null; then $CONTAINER_RUNTIME rm -f synapse + sleep 0.5 fi if $CONTAINER_RUNTIME inspect --type container nextcloud 1> /dev/null; then $CONTAINER_RUNTIME rm -f nextcloud @@ -35,6 +36,8 @@ $CONTAINER_RUNTIME run -d \ --add-host "synapse:127.0.0.1" \ docker.io/nextcloud +echo -e "Nextcloud has started. \e[1;38;5;2mOK\033[0m" + $CONTAINER_RUNTIME exec nextcloud bash -c 'apt-get update && apt-get install -y git' $CONTAINER_RUNTIME exec nextcloud chown -R 33 /var/www/html/custom_apps @@ -47,8 +50,11 @@ fi $CONTAINER_RUNTIME exec --user 33 nextcloud bash -c 'cd /var/www/html/custom_apps/upschooling && make composer' $CONTAINER_RUNTIME exec --user 33 nextcloud php occ maintenance:install --database sqlite --admin-user admin --admin-pass admin $CONTAINER_RUNTIME exec --user 33 nextcloud php occ config:system:set --value=true --type=boolean debug +$CONTAINER_RUNTIME exec --user 33 nextcloud php occ log:manage --level=debug $CONTAINER_RUNTIME exec --user 33 nextcloud php occ app:enable --force upschooling +echo -e "Nextcloud and app was configured. \e[1;38;5;2mOK\033[0m" + SYNAPSE_DATA_VOLUME_EXISTS="false" if [[ $RUNTIME_IS_PODMAN == "true" ]]; then if $CONTAINER_RUNTIME volume exists synapse-data; then @@ -121,3 +127,6 @@ if [[ "$REGISTER_USER_SUCCESS" != "0" ]]; then else echo -e "Matrix user @upschooling:synapse created. \e[1;38;5;2mOK\033[0m" fi + +# for nextcloud logs use $CONTAINER_RUNTIME exec --user 33 -it nextcloud ./occ log:watch +# for webserver logs use $CONTAINER_RUNTIME logs -f elementweb