Skip to content

Commit

Permalink
implemented debug config differently and fixed missing table issue
Browse files Browse the repository at this point in the history
  • Loading branch information
JonathanTreffler committed Jul 23, 2021
1 parent ab7fa6b commit 50c1f3f
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 7 deletions.
1 change: 1 addition & 0 deletions gitpod/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ services:
- NEXTCLOUD_ADMIN_PASSWORD=t2qQ1C6ktYUv7
- NEXTCLOUD_TRUSTED_DOMAINS=*.gitpod.io
- OVERWRITEPROTOCOL=https
- NEXTCLOUD_UPDATE=1

simplesamlphp:
build:
Expand Down
7 changes: 4 additions & 3 deletions gitpod/nextcloud/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
FROM nextcloud

COPY custom-entrypoint.sh /custom-entrypoint.sh
RUN chmod +x /custom-entrypoint.sh
COPY after-install.sh /after-install.sh

COPY debug.config.php /debug.config.php
RUN chmod +x /custom-entrypoint.sh
RUN chmod +x /after-install.sh

ENTRYPOINT ["/custom-entrypoint.sh"]

# Needs to be set again, even though it is already in base image
# reference: https://docs.docker.com/engine/reference/builder/#understand-how-cmd-and-entrypoint-interact
CMD ["apache2-foreground"]
CMD ["/after-install.sh"]
18 changes: 18 additions & 0 deletions gitpod/nextcloud/after-install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/sh

echo "after install !!!!!"

run_as() {
if [ "$(id -u)" = 0 ]; then
su -p www-data -s /bin/sh -c "$1"
else
sh -c "$1"
fi
}

run_as "php /var/www/html/occ config:system:set debug --value='true' --type=boolean"

# Weirdly the Nextcloud docker activates user_saml app automatically but doesn't run the migration steps necessary for it to work
run_as "php /var/www/html/occ migrations:migrate user_saml"

apache2-foreground
4 changes: 0 additions & 4 deletions gitpod/nextcloud/debug.config.php

This file was deleted.

0 comments on commit 50c1f3f

Please sign in to comment.