This repository has been archived on 2023-12-26. You can view files and clone it, but cannot push or open issues or pull requests.
shoarma/ansible/roles/nextcloud/docker-stack.yml
2023-05-04 21:06:43 +02:00

56 lines
1.4 KiB
YAML

version: '3'
networks:
traefik:
external: true
nextcloud:
services:
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
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