docker-rpi/nextcloud/nextcloud.yaml
Maciej Krok 7a14570601 simple fix
master
2021-01-23 10:53:53 +01:00

115 lines
2.5 KiB
YAML

version: '3.6'
services:
db:
image: postgres:11
volumes:
- db_data:/var/lib/postgresql/data
environment:
- POSTGRES_USER=nextcloud
- POSTGRES_PASSWORD=nextcloud
- POSTGRES_DB=notthis
networks:
- internal
deploy:
replicas: 1
restart_policy:
condition: on-failure
delay: 5s
redis:
image: redis:alpine
volumes:
- redis_data:/data
networks:
- internal
command: redis-server --requirepass redis
deploy:
replicas: 1
restart_policy:
condition: on-failure
delay: 5s
cron:
image: nextcloud:stable
volumes:
- nextcloud:/var/www/html
- apps:/var/www/html/custom_apps
- config:/var/www/html/config
- data:/var/www/html/data
entrypoint: /cron.sh
networks:
- internal
deploy:
replicas: 1
restart_policy:
condition: on-failure
delay: 5s
nextcloud:
image: nextcloud:stable
environment:
- POSTGRES_USER=nextcloud
- POSTGRES_PASSWORD=nextcloud
- POSTGRES_DB=nextcloud
- POSTGRES_HOST=db:5432
- REDIS_HOST=redis
- REDIS_HOST_PASSWORD=redis
volumes:
- nextcloud:/var/www/html
- apps:/var/www/html/custom_apps
- config:/var/www/html/config
- data:/var/www/html/data
# ports:
# - target: 80
# published: 8062
# protocol: tcp
# mode: host
networks:
- internal
- external
- traefik-net
# healthcheck:
# test: ["CMD", "curl", "-f", "http://localhost/cron.php"]
# interval: 1m30s
# timeout: 10s
# retries: 10
# start_period: 5m
deploy:
mode: replicated
replicas: 1
restart_policy:
condition: on-failure
delay: 5s
labels:
traefik.enable: "true"
traefik.frontend.rule: "Host:${HOST}"
traefik.port: 80
traefik.docker.network: traefik-net
traefik.frontend.headers.STSSeconds: 63072000
traefik.frontend.headers.STSIncludeSubdomains: "true"
traefik.frontend.headers.STSPreload: "true"
traefik.frontend.redirect.permanent: 'true'
traefik.frontend.redirect.regex: https://(.*)/.well-known/(card|cal)dav
traefik.frontend.redirect.replacement: https://$$1/remote.php/dav/
volumes:
db_data:
redis_data:
nextcloud:
apps:
config:
data:
networks:
external:
internal:
driver: overlay
internal: true
traefik-net:
external: true
### Environment variables
# HOST