Merge pull request 'feat(Nextcloud): Update docker-compose to add more configuration' (#9) from nextcloud into main
Reviewed-on: https://git.weko.io/resilien/services/pulls/9
This commit is contained in:
commit
e6ac037b11
|
@ -1,23 +1,49 @@
|
||||||
## DOCKER
|
########
|
||||||
|
# DOCKER
|
||||||
|
|
||||||
COMPOSE_FILE=./docker-compose.yml
|
#DOCKER_CONTEXT=
|
||||||
#DOCKER_HOST=
|
#DOCKER_HOST=
|
||||||
TRAEFIK_NETWORK_NAME=kifeart
|
SERVICES_DIR=..
|
||||||
|
COMPOSE_FILE=${SERVICES_DIR}/nextcloud/docker-compose.yml:${SERVICES_DIR}/nextcloud/docker-compose.local.yml:${SERVICES_DIR}/postgres/docker-compose.yml:${SERVICES_DIR}/redis/docker-compose.yml
|
||||||
|
#COMPOSE_PROJECT_NAME=
|
||||||
|
|
||||||
## APP
|
## APP
|
||||||
|
|
||||||
|
NEXTCLOUD_DOMAIN=nextcloud.cool.life
|
||||||
|
NEXTCLOUD_TRUSTED_DOMAINS=${NEXTCLOUD_DOMAIN}
|
||||||
NEXTCLOUD_CONTAINER_NAME=nextcloud
|
NEXTCLOUD_CONTAINER_NAME=nextcloud
|
||||||
NEXTCLOUD_VOLUME_NAME=nextcloud
|
NEXTCLOUD_VOLUME_NAME=nextcloud
|
||||||
NEXTCLOUD_DOMAIN=nextcloud.cool.life
|
|
||||||
|
|
||||||
NEXTCLOUD_ADMIN_USER: user
|
NEXTCLOUD_ADMIN_USER=user
|
||||||
NEXTCLOUD_ADMIN_PASSWORD: password
|
NEXTCLOUD_ADMIN_PASSWORD=password
|
||||||
|
|
||||||
# DATABASE
|
#SMTP_HOST=mail.test.org
|
||||||
# Voir la description ../postgres/README.md
|
#SMTP_SECURE=
|
||||||
|
#SMTP_PORT=
|
||||||
|
#SMTP_AUTHTYPE=
|
||||||
|
#SMTP_NAME=test@test.org
|
||||||
|
#SMTP_PASSWORD=blablablabla
|
||||||
|
#MAIL_FROM_ADDRESS=no-reply
|
||||||
|
#MAIL_DOMAIN=test.org
|
||||||
|
|
||||||
|
##########
|
||||||
|
# POSTGRES
|
||||||
|
|
||||||
POSTGRES_USER=user-example
|
POSTGRES_USER=user-example
|
||||||
POSTGRES_PASSWORD=password-example
|
POSTGRES_PASSWORD=password-example
|
||||||
POSTGRES_DB=postgres-database-name-example
|
POSTGRES_DB=postgres-database-name-example
|
||||||
POSTGRES_CONTAINER_NAME=nextcloud-postgres
|
POSTGRES_CONTAINER_NAME=nextcloud-postgres
|
||||||
POSTGRES_VOLUME_NAME=nextcloud-postgres
|
POSTGRES_VOLUME_NAME=nextcloud-postgres
|
||||||
|
#POSTGRES_IMAGE=
|
||||||
|
|
||||||
|
#######
|
||||||
|
# REDIS
|
||||||
|
|
||||||
|
REDIS_CONTAINER_NAME=nextcloud-redis
|
||||||
|
|
||||||
|
#########
|
||||||
|
# TRAEFIK
|
||||||
|
|
||||||
|
#TRAEFIK_NETWORK_NAME=
|
||||||
|
#TRAEFIK_ROUTER_NAME= # Don't use char '.'
|
||||||
|
#TRAEFIK_ENTRYPOINTS=
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
version: "3.8"
|
||||||
|
|
||||||
|
services:
|
||||||
|
nextcloud-web:
|
||||||
|
ports:
|
||||||
|
- ${LOCAL_PORT:-80}:80
|
|
@ -0,0 +1,13 @@
|
||||||
|
version: "3.8"
|
||||||
|
|
||||||
|
services:
|
||||||
|
nextcloud-fpm:
|
||||||
|
environment:
|
||||||
|
SMTP_HOST: ${SMTP_HOST?err} # The hostname of the SMTP server.
|
||||||
|
SMTP_SECURE: ${SMTP_SECURE:-ssl} # Set to ssl to use SSL, or tls to use STARTTLS.
|
||||||
|
SMTP_PORT: ${SMTP_PORT:-465}
|
||||||
|
SMTP_AUTHTYPE: ${SMTP_AUTHTYPE:-LOGIN}
|
||||||
|
SMTP_NAME: ${SMTP_NAME?err}
|
||||||
|
SMTP_PASSWORD: ${SMTP_PASSWORD?err}
|
||||||
|
MAIL_FROM_ADDRESS: ${MAIL_FROM_ADDRESS}
|
||||||
|
MAIL_DOMAIN: ${MAIL_DOMAIN}
|
|
@ -0,0 +1,18 @@
|
||||||
|
version: "3.8"
|
||||||
|
|
||||||
|
networks:
|
||||||
|
default:
|
||||||
|
name: ${TRAEFIK_NETWORK_NAME:-traefik}
|
||||||
|
|
||||||
|
services:
|
||||||
|
nextcloud-web:
|
||||||
|
environment:
|
||||||
|
TRUSTED_PROXIES: ${TRAEFIK_NETWORK_NAME:-traefik}
|
||||||
|
labels:
|
||||||
|
- traefik.enable=true
|
||||||
|
- traefik.docker.network=${TRAEFIK_NETWORK_NAME:-traefik}
|
||||||
|
- traefik.http.routers.${TRAEFIK_ROUTER_NAME:-nextcloud}.rule=Host(`${NEXTCLOUD_DOMAIN:?err}`)
|
||||||
|
- traefik.http.routers.${TRAEFIK_ROUTER_NAME:-nextcloud}.entrypoints=${TRAEFIK_ENTRYPOINTS:-web}
|
||||||
|
- traefik.http.routers.${TRAEFIK_ROUTER_NAME:-nextcloud}.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/
|
|
@ -1,99 +1,55 @@
|
||||||
version: "3.8"
|
version: "3.8"
|
||||||
|
|
||||||
networks:
|
|
||||||
default:
|
|
||||||
name: ${TRAEFIK_NETWORK_NAME}
|
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
nextcloud:
|
nextcloud:
|
||||||
name: ${NEXTCLOUD_VOLUME_NAME}
|
name: ${NEXTCLOUD_VOLUME_NAME:-nextcloud}
|
||||||
nextcloud-postgres:
|
|
||||||
name: ${POSTGRES_VOLUME_NAME}
|
|
||||||
|
|
||||||
services:
|
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:
|
nextcloud-web:
|
||||||
container_name: nextcloud-web
|
container_name: ${NEXTCLOUD_CONTAINER_NAME:-nextcloud}-web
|
||||||
build: ./web
|
build: web
|
||||||
restart: always
|
restart: always
|
||||||
|
environment:
|
||||||
|
PUID: ${NEXTCLOUD_PUID:-1000}
|
||||||
|
PGID: ${NEXTCLOUD_PGID:-1000}
|
||||||
depends_on:
|
depends_on:
|
||||||
- nextcloud-fpm
|
- nextcloud-fpm
|
||||||
volumes:
|
volumes_from:
|
||||||
- nextcloud:/var/www/html
|
- nextcloud-fpm
|
||||||
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
|
|
||||||
|
|
||||||
nextcloud-cron:
|
nextcloud-cron:
|
||||||
image: ${NEXTCLOUD_IMAGE:-nextcloud:22.2.0-fpm-alpine}
|
image: ${NEXTCLOUD_IMAGE:-nextcloud:22.2.3-fpm-alpine}
|
||||||
container_name: nextcloud-cron
|
container_name: ${NEXTCLOUD_CONTAINER_NAME:-nextcloud}-cron
|
||||||
restart: always
|
restart: always
|
||||||
depends_on:
|
depends_on:
|
||||||
- nextcloud-web
|
- nextcloud-web
|
||||||
entrypoint: /cron.sh
|
entrypoint: /cron.sh
|
||||||
environment:
|
environment:
|
||||||
PUID: 1001
|
PUID: ${NEXTCLOUD_PUID:-1000}
|
||||||
PGID: 119
|
PGID: ${NEXTCLOUD_PGID:-1000}
|
||||||
volumes:
|
volumes_from:
|
||||||
- nextcloud:/var/www/html
|
- nextcloud-fpm
|
||||||
- /etc/timezone:/etc/timezone:ro
|
|
||||||
- /etc/localtime:/etc/localtime:ro
|
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
FROM nginx:1.21.1-alpine
|
FROM nginx:1.21.4-alpine
|
||||||
|
|
||||||
COPY nginx.conf /etc/nginx/nginx.conf
|
COPY nginx.conf /etc/nginx/nginx.conf
|
||||||
|
|
Loading…
Reference in New Issue