Add nextcloud logging config in run.sh

This commit is contained in:
Ben 2022-02-26 19:40:02 +01:00
parent 5a8c3920e1
commit fdd746de32
Signed by: ben
GPG Key ID: 0F54A7ED232D3319
1 changed files with 9 additions and 0 deletions

9
run.sh
View File

@ -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