From 9c1ac64fb540486b9a4a8edc80c2580bdad7827c Mon Sep 17 00:00:00 2001 From: Wonderfall Date: Wed, 22 Feb 2017 02:26:53 +0100 Subject: [PATCH] nextcloud: more confortable setup --- nextcloud/11.0/Dockerfile | 3 +-- nextcloud/11.0/setup.sh | 7 +++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/nextcloud/11.0/Dockerfile b/nextcloud/11.0/Dockerfile index 4a929d0..f25b6a7 100644 --- a/nextcloud/11.0/Dockerfile +++ b/nextcloud/11.0/Dockerfile @@ -12,8 +12,7 @@ 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 \ diff --git a/nextcloud/11.0/setup.sh b/nextcloud/11.0/setup.sh index b2c11d2..a481867 100755 --- a/nextcloud/11.0/setup.sh +++ b/nextcloud/11.0/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