From d54d27957014db4ca5e8e130f530575f4aba6056 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 12 Jul 2022 12:20:42 +0200 Subject: [PATCH] working install of oasis21 infra --- dump_bdd_volumes.sh | 3 + nextcloud/docker-compose.yml | 26 +++--- nextcloud/dockerfile | 15 ++++ nextcloud/loolwsd.xml | 166 ----------------------------------- nextcloud/supervisord.conf | 22 +++++ 5 files changed, 56 insertions(+), 176 deletions(-) create mode 100755 dump_bdd_volumes.sh create mode 100644 nextcloud/dockerfile delete mode 100644 nextcloud/loolwsd.xml create mode 100644 nextcloud/supervisord.conf diff --git a/dump_bdd_volumes.sh b/dump_bdd_volumes.sh new file mode 100755 index 0000000..ba4b7e4 --- /dev/null +++ b/dump_bdd_volumes.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +docker exec nextcloud-db pg_dumpall -U nc > /DATA/dump_bdd/nextcloud.sql diff --git a/nextcloud/docker-compose.yml b/nextcloud/docker-compose.yml index 95ea285..6476de2 100644 --- a/nextcloud/docker-compose.yml +++ b/nextcloud/docker-compose.yml @@ -2,9 +2,11 @@ version: '3.7' volumes: nextcloud-db: - name: docker_nextcloud-db - nextcloud: + name: docker_nextcloud-db-23 + nextcloud-data: name: docker_nextcloud + nextcloud: + name: docker_nextcloud-conf networks: nextcloud: @@ -13,11 +15,14 @@ networks: services: nextcloud-app: - image: nextcloud:23.0 + image: nextcloud-cron:23.0.6 container_name: nextcloud-app restart: unless-stopped + extra_hosts : + code.oasis21.org : 172.16.7.10 volumes: - nextcloud:/var/www/html + - nextcloud-data:/var/www/html/data environment: - "TZ=Europe/Paris" - REDIS_HOST=redis @@ -37,8 +42,8 @@ services: # https://docs.nextcloud.com/server/16/admin_manual/configuration_server/reverse_proxy_configuration.html traefik.http.routers.nextcloud-web.middlewares: nextcloud-web@docker traefik.http.middlewares.nextcloud-web.redirectregex.permanent: true - traefik.http.middlewares.nextcloud-web.redirectregex.regex: ^/.well-known/(card|cal)dav - traefik.http.middlewares.nextcloud-web.redirectregex.replacement: /remote.php/dav/ + traefik.http.middlewares.nextcloud-web.redirectregex.regex: "https://(.*)/.well-known/(card|cal)dav" + traefik.http.middlewares.nextcloud-web.redirectregex.replacement: "https://$${1}/remote.php/dav/" restart: unless-stopped redis: @@ -66,14 +71,15 @@ services: restart: unless-stopped collabora: - image: libreoffice/online:master + image: collabora/code:22.05.3.1.1 container_name: collabora - volumes: - - ./loolwsd.xml:/etc/loolwsd/loolwsd.xml + extra_hosts : + cloud.oasis21.org : 172.16.7.10 environment: - "TZ=Europe/Paris" - - domain=cloud\.calad\.re - - serveur_name=code\.calad\.re + - aliasgroup1=cloud.oasis21.org + - DONT_GEN_SSL_CERT=1 + - serveur_name=code.oasis21.org - "extra_params=--o:ssl.enable=false --o:ssl.termination=true" networks: - nextcloud diff --git a/nextcloud/dockerfile b/nextcloud/dockerfile new file mode 100644 index 0000000..96fe5ae --- /dev/null +++ b/nextcloud/dockerfile @@ -0,0 +1,15 @@ +FROM nextcloud:23.0.6-apache + +ARG VERSION + +RUN apt-get update && apt-get install -y \ + supervisor \ + libmagickcore-6.q16-6-extra \ + && rm -rf /var/lib/apt/lists/* \ + && mkdir /var/log/supervisord /var/run/supervisord + +COPY supervisord.conf / + +ENV NEXTCLOUD_UPDATE=1 + +CMD ["/usr/bin/supervisord", "-c", "/supervisord.conf"] diff --git a/nextcloud/loolwsd.xml b/nextcloud/loolwsd.xml deleted file mode 100644 index 7a9ce67..0000000 --- a/nextcloud/loolwsd.xml +++ /dev/null @@ -1,166 +0,0 @@ - - - - - - en_GB en_US fr_FR - - - - - code.oasis21.org - - - - 1 - - 4 - 5 - - false - 3600 - - - 30 - 300 - false - 0 - 8000 - 0 - 0 - 100 - 100 - - - - 120 - 900 - - - loleaflet.html - - - true - debug - true - - /var/log/loolwsd.log - 50M - timestamp - true - 10 days - 10 - true - false - - - false - 82589933 - - - - false - - - - - - - - false - - - - - - all - any - - - - 192\.168\.[0-9]{1,3}\.[0-9]{1,3} - ::ffff:192\.168\.[0-9]{1,3}\.[0-9]{1,3} - 127\.0\.0\.1 - ::ffff:127\.0\.0\.1 - ::1 - 172\.17\.[0-9]{1,3}\.[0-9]{1,3} - ::ffff:172\.17\.[0-9]{1,3}\.[0-9]{1,3} - - cloud.oasis21.org - - - - true - true - /etc/loolwsd/cert.pem - /etc/loolwsd/key.pem - /etc/loolwsd/ca-chain.cert.pem - - - 1000 - - - - - - - - - true - true - - - - - - - - - false - false - - - - - - - cloud.oasis21.org - 10\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3} - 172\.1[6789]\.[0-9]{1,3}\.[0-9]{1,3} - 172\.2[0-9]\.[0-9]{1,3}\.[0-9]{1,3} - 172\.3[01]\.[0-9]{1,3}\.[0-9]{1,3} - 192\.168\.[0-9]{1,3}\.[0-9]{1,3} - 192\.168\.1\.1 - 0 - false - - 900 - - - - cloud.oasis21.org - - - true - - - - - - - - - true - - - true - false - nextcloud - __COLLABORA__PASSWORD__ - - - - - - diff --git a/nextcloud/supervisord.conf b/nextcloud/supervisord.conf new file mode 100644 index 0000000..836a08a --- /dev/null +++ b/nextcloud/supervisord.conf @@ -0,0 +1,22 @@ +[supervisord] +nodaemon=true +logfile=/var/log/supervisord/supervisord.log +pidfile=/var/run/supervisord/supervisord.pid +childlogdir=/var/log/supervisord/ +logfile_maxbytes=50MB ; maximum size of logfile before rotation +logfile_backups=10 ; number of backed up logfiles +loglevel=error + +[program:apache2] +stdout_logfile=/dev/stdout +stdout_logfile_maxbytes=0 +stderr_logfile=/dev/stderr +stderr_logfile_maxbytes=0 +command=apache2-foreground + +[program:cron] +stdout_logfile=/dev/stdout +stdout_logfile_maxbytes=0 +stderr_logfile=/dev/stderr +stderr_logfile_maxbytes=0 +command=/cron.sh