73 lines
1.8 KiB
YAML
73 lines
1.8 KiB
YAML
version: '3'
|
|
|
|
networks:
|
|
traefik:
|
|
external: true
|
|
nextcloud:
|
|
|
|
services:
|
|
redis:
|
|
image: redis:5
|
|
networks:
|
|
- nextcloud
|
|
expose:
|
|
- 6379
|
|
volumes:
|
|
- type: bind
|
|
source: /mnt/data/nextcloud/redis
|
|
target: /data
|
|
deploy:
|
|
placement:
|
|
constraints:
|
|
- "node.labels.nextcloud == true"
|
|
|
|
db:
|
|
image: mariadb:10.6
|
|
networks:
|
|
- nextcloud
|
|
command: --transaction-isolation=READ-COMMITTED --log-bin=binlog --binlog-format=ROW
|
|
volumes:
|
|
- type: bind
|
|
source: /mnt/data/nextcloud/db
|
|
target: /var/lib/mysql
|
|
environment:
|
|
- MYSQL_ROOT_PASSWORD=password
|
|
- MYSQL_PASSWORD=password
|
|
- MYSQL_DATABASE=nextcloud
|
|
- MYSQL_USER=nextcloud
|
|
deploy:
|
|
placement:
|
|
constraints:
|
|
- "node.labels.nextcloud == true"
|
|
|
|
app:
|
|
image: nextcloud
|
|
networks:
|
|
- traefik
|
|
- nextcloud
|
|
links:
|
|
- db
|
|
volumes:
|
|
- type: bind
|
|
source: /mnt/data/nextcloud/html
|
|
target: /var/www/html
|
|
environment:
|
|
- MYSQL_PASSWORD=password
|
|
- MYSQL_DATABASE=nextcloud
|
|
- MYSQL_USER=nextcloud
|
|
- MYSQL_HOST=db
|
|
- REDIS_HOST=redis
|
|
- REDIS_HOST_PASSWORD=
|
|
deploy:
|
|
placement:
|
|
constraints:
|
|
- "node.labels.nextcloud == true"
|
|
labels:
|
|
- traefik.enable=true
|
|
- traefik.http.routers.nextcloud.entrypoints=websecure
|
|
- traefik.http.routers.nextcloud.rule=Host(`cloud.pim.kunis.nl`)
|
|
- traefik.http.routers.nextcloud.service=nextcloud
|
|
- traefik.http.routers.nextcloud.tls=true
|
|
- traefik.http.routers.nextcloud.tls.certresolver=letsencrypt
|
|
- traefik.docker.network=traefik
|
|
- traefik.http.services.nextcloud.loadbalancer.server.port=80
|