82 lines
2.0 KiB
YAML
82 lines
2.0 KiB
YAML
version: '3'
|
|
|
|
services:
|
|
web:
|
|
image: ministicraft/nextcloud:stable
|
|
depends_on:
|
|
- db
|
|
environment:
|
|
- "POSTGRES_DB=nextcloud"
|
|
- "POSTGRES_USER=user"
|
|
- "POSTGRES_PASSWORD=pwd"
|
|
- "POSTGRES_HOST=db"
|
|
volumes:
|
|
- /storage/plex/:/data/Plex
|
|
- /storage/download/:/data/download
|
|
- /storage/Upload/:/data/Upload
|
|
- /storage/Games/:/data/Games
|
|
- /storage/MusicLossy/:/data/Music_lossy
|
|
- /storage/syncthing/:/data/syncthing
|
|
- /storage/cloud/:/var/www/html/data/
|
|
- nextcloud_config:/var/www/html/config
|
|
networks:
|
|
- dmz
|
|
- nextcloud
|
|
deploy:
|
|
mode: replicated
|
|
replicas: 1
|
|
placement:
|
|
constraints: [node.role == manager]
|
|
resources:
|
|
limits:
|
|
cpus: '1.0'
|
|
memory: 1G
|
|
reservations:
|
|
cpus: '0.1'
|
|
memory: 100M
|
|
labels:
|
|
- "traefik.frontend.rule=Host:nextcloud.cloud.arnaud-pc.fr,cloud.arnaud-pc.fr"
|
|
- "traefik.port=80"
|
|
- "traefik.docker.network=dmz"
|
|
- "traefik.passHostHeader=true"
|
|
- "traefik.frontend.headers.customRequestHeaders=X_FORWARDED_PROTO:https"
|
|
- "traefik.frontend.headers.SSLProxyHeaders=X_FORWARDED_PROTO:https"
|
|
- "traefik.backend.loadbalancer.swarm=true"
|
|
- "traefik.backend.loadbalancer.method=drr"
|
|
- "traefik.enable=true"
|
|
|
|
db:
|
|
image: postgres:9.6
|
|
environment:
|
|
- "POSTGRES_USER=user"
|
|
- "POSTGRES_PASSWORD=pwd"
|
|
- "POSTGRES_DB=nextcloud"
|
|
volumes:
|
|
- postgres_nextcloud_data:/var/lib/postgresql/data
|
|
networks:
|
|
- nextcloud
|
|
deploy:
|
|
mode: replicated
|
|
replicas: 1
|
|
resources:
|
|
limits:
|
|
cpus: '0.5'
|
|
memory: 500M
|
|
reservations:
|
|
cpus: '0.1'
|
|
memory: 100M
|
|
|
|
networks:
|
|
dmz:
|
|
external: true
|
|
nextcloud:
|
|
driver: overlay
|
|
|
|
volumes:
|
|
nextcloud_data:
|
|
driver: convoy
|
|
nextcloud_config:
|
|
driver: convoy
|
|
postgres_nextcloud_data:
|
|
driver: convoy
|