diff --git a/nextcloud/daily/Dockerfile b/nextcloud/daily/Dockerfile index 0bc2c44..6eae175 100644 --- a/nextcloud/daily/Dockerfile +++ b/nextcloud/daily/Dockerfile @@ -11,11 +11,9 @@ ENV UID=991 GID=991 \ CRON_MEMORY_LIMIT=1g \ TZ=Etc/UTC \ DB_TYPE=sqlite3 \ - ADMIN_USER=admin \ - ADMIN_PASSWORD=admin + DOMAIN=localhost -RUN echo "@testing https://nl.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories \ - && echo "@testing https://nl.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories \ +RUN echo "@testing https://nl.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories \ && BUILD_DEPS=" \ gnupg \ tar \ diff --git a/nextcloud/daily/setup.sh b/nextcloud/daily/setup.sh index b2c11d2..a481867 100755 --- a/nextcloud/daily/setup.sh +++ b/nextcloud/daily/setup.sh @@ -67,7 +67,7 @@ echo "Starting automatic configuration..." # Execute ownCloud's setup step, which creates the ownCloud database. # It also wipes it if it exists. And it updates config.php with database # settings and deletes the autoconfig.php file. -(cd /nextcloud; php7.1 index.php) +(cd /nextcloud; php7.1 index.php &>/dev/null) echo "Automatic configuration finished." # Update config.php. @@ -97,9 +97,12 @@ echo ";"; ?> EOF +sed -i "s/localhost/$DOMAIN/g" /config/config.php chown -R $UID:$GID /config /data # Enable/disable apps. Note that this must be done after the ownCloud setup. # The firstrunwizard gave Josh all sorts of problems, so disabling that. # user_external is what allows ownCloud to use IMAP for login. The contacts # and calendar apps are the extensions we really care about here. -occ app:disable firstrunwizard +if [[ ! -z "$ADMIN_USER" ]]; then + occ app:disable firstrunwizard +fi