From bf09b8540b9e0a236a6dd9b0da1a6a948f7c3939 Mon Sep 17 00:00:00 2001 From: afornerot Date: Mon, 6 Nov 2023 17:12:18 +0100 Subject: [PATCH] image nextcloud --- src/envole-1.0/env/.env.zapp.nextcloud | 1 + .../misc/nextcloud/containers/nextcloud/Dockerfile | 4 ++++ .../misc/nextcloud/containers/nextcloud/apache.conf | 1 + src/envole-1.0/misc/nextcloud/docker-compose.yml | 8 ++++++++ src/envole-1.0/volume/nextcloud/prestart/prestart.sh | 6 ++++-- 5 files changed, 18 insertions(+), 2 deletions(-) create mode 100755 src/envole-1.0/misc/nextcloud/containers/nextcloud/Dockerfile create mode 100755 src/envole-1.0/misc/nextcloud/containers/nextcloud/apache.conf create mode 100755 src/envole-1.0/misc/nextcloud/docker-compose.yml diff --git a/src/envole-1.0/env/.env.zapp.nextcloud b/src/envole-1.0/env/.env.zapp.nextcloud index 449c21c..a278834 100644 --- a/src/envole-1.0/env/.env.zapp.nextcloud +++ b/src/envole-1.0/env/.env.zapp.nextcloud @@ -7,4 +7,5 @@ MYSQL_USER=${MARIADB_USER} MYSQL_PASSWORD=${MARIADB_PASSWORD} NEXTCLOUD_ADMIN_USER=${ADMIN_USER} NEXTCLOUD_ADMIN_PASSWORD=${ADMIN_PASSWORD} +NEXTCLOUD_ALIAS=/ diff --git a/src/envole-1.0/misc/nextcloud/containers/nextcloud/Dockerfile b/src/envole-1.0/misc/nextcloud/containers/nextcloud/Dockerfile new file mode 100755 index 0000000..be6e41e --- /dev/null +++ b/src/envole-1.0/misc/nextcloud/containers/nextcloud/Dockerfile @@ -0,0 +1,4 @@ +FROM docker.io/library/nextcloud + +COPY apache.conf /etc/apache2/sites-available/nextcloud.conf +RUN a2ensite nextcoud \ No newline at end of file diff --git a/src/envole-1.0/misc/nextcloud/containers/nextcloud/apache.conf b/src/envole-1.0/misc/nextcloud/containers/nextcloud/apache.conf new file mode 100755 index 0000000..0800051 --- /dev/null +++ b/src/envole-1.0/misc/nextcloud/containers/nextcloud/apache.conf @@ -0,0 +1 @@ +Alias /nextcloud /var/www/html \ No newline at end of file diff --git a/src/envole-1.0/misc/nextcloud/docker-compose.yml b/src/envole-1.0/misc/nextcloud/docker-compose.yml new file mode 100755 index 0000000..3e19464 --- /dev/null +++ b/src/envole-1.0/misc/nextcloud/docker-compose.yml @@ -0,0 +1,8 @@ +version: '3' + +services: + nextcloud: + build: + context: ./containers/nextcloud + image: reg.cadoles.com/envole/nextcloud + container_name: nextcloud \ No newline at end of file diff --git a/src/envole-1.0/volume/nextcloud/prestart/prestart.sh b/src/envole-1.0/volume/nextcloud/prestart/prestart.sh index ff4e26d..b0ad84f 100755 --- a/src/envole-1.0/volume/nextcloud/prestart/prestart.sh +++ b/src/envole-1.0/volume/nextcloud/prestart/prestart.sh @@ -11,8 +11,10 @@ run_as() { echo echo "== INSTALLATION APP NEXTCLOUD ================================================" -echo "==TRUSTED DOMAINE" +echo "== CONFIG" run_as 'php occ config:system:set trusted_domains 1 --value '${WEB_URL} +run_as 'php occ config:system:set overwrite.cli.url --value '${NEXTCLOUD_URL} +#run_as 'php occ config:system:set htaccess.RewriteBase --value '${NEXTCLOUD_ALIAS} echo echo "== CALENDAR" @@ -56,7 +58,7 @@ run_as 'php occ app:install files_mindmap' run_as 'php occ app:update files_mindmap' run_as 'php occ app:enable files_mindmap' -if [[ "${MODE_AUTH}" == "CAS" && "CAS_ACTIVATE" == "1" ]] +if [[ "${MODE_AUTH}" == "CAS" && "${CAS_ACTIVATE}" == "1" ]] then echo echo "== USER CAS"