Deliver complete stack for nextcloud.
This commit is contained in:
@@ -7,40 +7,48 @@ volumes:
|
||||
name: nextcloud-data
|
||||
nextcloud-config:
|
||||
name: nextcloud-config
|
||||
nextcloud-db:
|
||||
name: nextcloud-db
|
||||
nextcloud-redis:
|
||||
name: nextcloud-redis
|
||||
|
||||
networks:
|
||||
proxy:
|
||||
external: true
|
||||
internal:
|
||||
external: true
|
||||
nextcloud:
|
||||
name: nextcloud
|
||||
external: false
|
||||
|
||||
services:
|
||||
nextcloud:
|
||||
image: nextcloud:22-fpm-alpine
|
||||
container_name: nextcloud
|
||||
hostname: nextcloud-web
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- nextcloud:/var/www/html
|
||||
- nextcloud-data:/var/www/html/data
|
||||
- nextcloud-config:/var/www/html/config
|
||||
depends_on:
|
||||
- nextcloud-db
|
||||
- nextcloud-redis
|
||||
networks:
|
||||
- internal
|
||||
env_file: ../.env
|
||||
- nextcloud
|
||||
environment:
|
||||
- POSTGRES_DB:nextcloud
|
||||
- POSTGRES_USER:nextcloud
|
||||
- POSTGRES_PASSWORD:jX9hKI2POvt1VrjVbBs4
|
||||
- POSTGRES_HOST:pgsql14
|
||||
- REDIS_HOST:redis
|
||||
- REDIS_HOST_PASSWORD:${REDIS_PW}
|
||||
- NEXTCLOUD_ADMIN_USER:${NEXTCLOUD_ADMIN_USER}
|
||||
- NEXTCLOUD_ADMIN_PASSWORD:${NEXTCLOUD_ADMIN_PW}
|
||||
- NEXTCLOUD_TRUSTED_DOMAINS:cs-nextcloud.ddnss.de nextcloud.lan
|
||||
- VIRTUAL_HOST:nextcloud
|
||||
POSTGRES_PASSWORD: ${DB_PASS}
|
||||
POSTGRES_USER: ${DB_USER}
|
||||
POSTGRES_DB: ${DB_NAME}
|
||||
POSTGRES_HOST: nextcloud-db:5432
|
||||
REDIS_HOST: nextcloud-redis
|
||||
NEXTCLOUD_ADMIN_USER: ${NEXTCLOUD_ADMIN_USER}
|
||||
NEXTCLOUD_ADMIN_PASSWORD: ${NEXTCLOUD_ADMIN_PW}
|
||||
NEXTCLOUD_TRUSTED_DOMAINS: cs-nextcloud.ddnss.de nextcloud.lan
|
||||
VIRTUAL_HOST: nextcloud
|
||||
|
||||
nginx-nc:
|
||||
nextcloud-web:
|
||||
image: nginx:alpine
|
||||
container_name: nginx-nc
|
||||
container_name: nextcloud-web
|
||||
hostname: nextcloud-web
|
||||
restart: unless-stopped
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
@@ -61,12 +69,39 @@ services:
|
||||
- "traefik.http.middlewares.nextcloud-redirect.redirectregex.permanent=true"
|
||||
- "traefik.http.middlewares.nextcloud-redirect.redirectregex.regex=^https://(.*)/.well-known/(card|cal)dav"
|
||||
- "traefik.http.middlewares.nextcloud-redirect.redirectregex.replacement=https://$${1}/remote.php/dav/"
|
||||
|
||||
depends_on:
|
||||
- nextcloud
|
||||
networks:
|
||||
- proxy
|
||||
- internal
|
||||
- nextcloud
|
||||
volumes:
|
||||
- nextcloud:/var/www/html
|
||||
- ${PWD}/nextcloud.conf:/etc/nginx/conf.d/default.conf
|
||||
|
||||
nextcloud-db:
|
||||
image: postgres:14-alpine
|
||||
container_name: nextcloud-db
|
||||
hostname: naextcloud-db
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- nextcloud-db:/var/lib/postgresql/data
|
||||
networks:
|
||||
- nextcloud
|
||||
environment:
|
||||
POSTGRES_PASSWORD: ${DB_PASS}
|
||||
POSTGRES_USER: ${DB_USER}
|
||||
POSTGRES_DB: ${DB_NAME}
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U $DB_USER"]
|
||||
|
||||
nextcloud-redis:
|
||||
image: redis:alpine
|
||||
container_name: nextcloud-redis
|
||||
hostname: nextcloud-redis
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- nextcloud-redis:/data
|
||||
networks:
|
||||
- nextcloud
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "redis-cli ping"]
|
||||
|
||||
Reference in New Issue
Block a user