feat(Nextcloud): Update docker-compose to add more configuration
_Détails - Mise à jour de l'image docker nextcloud - Mise à jour de l'image nginx - Ajout d'une configuration spécifique Traefik séparé - Ajout d'une configuration spécifique SMTP séparé - Ajout d'une configuration spécifique pour lancer le container localemement - Ajout de 2 variables pour configurer spécifiquement un PUID et PGID - Suppression de la configuration Postgres spécifique pour utiliser le docker-compose généric - Suppression de la configuration Redis spécifique pour utiliser le docker-compose généric _Pourquoi - Pour permettre une meilleure intégration dans l'infrastructure RésiLien
This commit is contained in:
@@ -1,99 +1,55 @@
|
||||
version: "3.8"
|
||||
|
||||
networks:
|
||||
default:
|
||||
name: ${TRAEFIK_NETWORK_NAME}
|
||||
|
||||
volumes:
|
||||
nextcloud:
|
||||
name: ${NEXTCLOUD_VOLUME_NAME}
|
||||
nextcloud-postgres:
|
||||
name: ${POSTGRES_VOLUME_NAME}
|
||||
name: ${NEXTCLOUD_VOLUME_NAME:-nextcloud}
|
||||
|
||||
services:
|
||||
nextcloud-fpm:
|
||||
container_name: ${NEXTCLOUD_CONTAINER_NAME:-nextcloud}-fpm
|
||||
image: ${NEXTCLOUD_IMAGE:-nextcloud:22.2.3-fpm-alpine}
|
||||
restart: always
|
||||
depends_on:
|
||||
- postgres
|
||||
- redis
|
||||
volumes:
|
||||
- nextcloud:/var/www/html
|
||||
- /etc/timezone:/etc/timezone:ro
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
environment:
|
||||
NEXTCLOUD_TRUSTED_DOMAINS: ${NEXTCLOUD_TRUSTED_DOMAINS?err}
|
||||
NEXTCLOUD_ADMIN_USER: ${NEXTCLOUD_ADMIN_USER?err}
|
||||
NEXTCLOUD_ADMIN_PASSWORD: ${NEXTCLOUD_ADMIN_PASSWORD?err}
|
||||
OVERWRITEPROTOCOL: ${OVERWRITEPROTOCOL:-https}
|
||||
POSTGRES_HOST: postgres # Name is same as ../postgres/docker-compose.yml:8
|
||||
POSTGRES_USER: ${POSTGRES_USER:?err}
|
||||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:?err}
|
||||
POSTGRES_DB: ${POSTGRES_DB:?err}
|
||||
REDIS_HOST: redis # Name is same as ../redis/docker-compose.yml:4
|
||||
PUID: ${NEXTCLOUD_PUID:-1000}
|
||||
PGID: ${NEXTCLOUD_PGID:-1000}
|
||||
|
||||
nextcloud-web:
|
||||
container_name: nextcloud-web
|
||||
build: ./web
|
||||
container_name: ${NEXTCLOUD_CONTAINER_NAME:-nextcloud}-web
|
||||
build: web
|
||||
restart: always
|
||||
environment:
|
||||
PUID: ${NEXTCLOUD_PUID:-1000}
|
||||
PGID: ${NEXTCLOUD_PGID:-1000}
|
||||
depends_on:
|
||||
- nextcloud-fpm
|
||||
volumes:
|
||||
- nextcloud:/var/www/html
|
||||
labels:
|
||||
traefik.enable: 'true'
|
||||
traefik.docker.network: ${TRAEFIK_NETWORK_NAME}
|
||||
traefik.http.routers.nextcloud-fpm.rule: 'Host(`${NEXTCLOUD_DOMAIN}`)'
|
||||
traefik.http.routers.nextcloud-fpm.entrypoints: 'web'
|
||||
traefik.http.routers.nextcloud-fpm.middlewares: nextcloud_redirect
|
||||
traefik.http.middlewares.nextcloud_redirect.redirectregex.regex: /.well-known/(card|cal)dav
|
||||
traefik.http.middlewares.nextcloud_redirect.redirectregex.replacement: /remote.php/dav/
|
||||
|
||||
nextcloud-fpm:
|
||||
container_name: nextcloud-fpm
|
||||
image: ${NEXTCLOUD_IMAGE:-nextcloud:22.2.0-fpm-alpine}
|
||||
restart: always
|
||||
hostname: ${NEXTCLOUD_DOMAIN}
|
||||
depends_on:
|
||||
- nextcloud-postgres
|
||||
- nextcloud-redis
|
||||
volumes:
|
||||
- nextcloud:/var/www/html
|
||||
- /etc/timezone:/etc/timezone:ro
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
environment:
|
||||
NEXTCLOUD_TRUSTED_DOMAINS: ${NEXTCLOUD_DOMAIN}
|
||||
NEXTCLOUD_ADMIN_USER: ${NEXTCLOUD_ADMIN_USER}
|
||||
NEXTCLOUD_ADMIN_PASSWORD: ${NEXTCLOUD_ADMIN_PASSWORD}
|
||||
OVERWRITEPROTOCOL: 'https'
|
||||
APACHE_DISABLE_REWRITE_IP: '1'
|
||||
TRUSTED_PROXIES: ${TRAEFIK_NETWORK_NAME}
|
||||
OVERWRITEPROTOCOL: 'https'
|
||||
POSTGRES_HOST: ${POSTGRES_CONTAINER_NAME}
|
||||
POSTGRES_DB: ${POSTGRES_DB}
|
||||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
||||
POSTGRES_USER: ${POSTGRES_USER}
|
||||
REDIS_HOST: 'nextcloud-redis'
|
||||
PUID: 1001
|
||||
PGID: 119
|
||||
|
||||
nextcloud-postgres:
|
||||
container_name: ${POSTGRES_CONTAINER_NAME}
|
||||
image: ${POSTGRES_IMAGE:-postgres:12.8-alpine}
|
||||
restart: always
|
||||
environment:
|
||||
POSTGRES_USER: ${POSTGRES_USER}
|
||||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
||||
POSTGRES_DB: ${POSTGRES_DB}
|
||||
PUID: 1001
|
||||
PGID: 119
|
||||
volumes:
|
||||
- nextcloud-postgres:/var/lib/postgresql/data
|
||||
- /etc/timezone:/etc/timezone:ro
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
|
||||
nextcloud-redis:
|
||||
image: ${REDIS_IMAGE:-redis:6.2.6-alpine}
|
||||
container_name: nextcloud-redis
|
||||
restart: always
|
||||
environment:
|
||||
PUID: 1001
|
||||
PGID: 119
|
||||
volumes:
|
||||
- /etc/timezone:/etc/timezone:ro
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
volumes_from:
|
||||
- nextcloud-fpm
|
||||
|
||||
nextcloud-cron:
|
||||
image: ${NEXTCLOUD_IMAGE:-nextcloud:22.2.0-fpm-alpine}
|
||||
container_name: nextcloud-cron
|
||||
image: ${NEXTCLOUD_IMAGE:-nextcloud:22.2.3-fpm-alpine}
|
||||
container_name: ${NEXTCLOUD_CONTAINER_NAME:-nextcloud}-cron
|
||||
restart: always
|
||||
depends_on:
|
||||
- nextcloud-web
|
||||
entrypoint: /cron.sh
|
||||
environment:
|
||||
PUID: 1001
|
||||
PGID: 119
|
||||
volumes:
|
||||
- nextcloud:/var/www/html
|
||||
- /etc/timezone:/etc/timezone:ro
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
PUID: ${NEXTCLOUD_PUID:-1000}
|
||||
PGID: ${NEXTCLOUD_PGID:-1000}
|
||||
volumes_from:
|
||||
- nextcloud-fpm
|
||||
|
Reference in New Issue
Block a user