playground/docker-stack/nextcloud.yml

48 lines
1.3 KiB
YAML

version: '3.8'
networks:
host-network:
name: host
external: true
prometheus-network:
external: true
traefik-network:
external: true
database-network:
external: true
services:
nextcloud-service:
image: docker.io/nextcloud:24-apache
hostname: nextcloud-service-host
networks:
- traefik-network
volumes:
- type: bind
source: /media/seagate-1000/nextcloud
target: /var/www/html
deploy:
mode: replicated
replicas: 1
placement:
max_replicas_per_node: 1
constraints:
##- node.role == manager
- node.hostname == rose
resources:
reservations:
memory: 1GB
limits:
memory: 2GB
restart_policy:
condition: on-failure
labels:
- traefik.enable=true
##- traefik.docker.network=traefik-network
- traefik.http.routers.nextcloud-https.entrypoints=websec
- traefik.http.routers.nextcloud-https.rule=Host(`nc.miflux.com`)
- traefik.http.routers.nextcloud-https.tls=true
- traefik.http.services.nextcloud-service.loadbalancer.server.port=80
- traefik.http.services.nextcloud-service.loadbalancer.sticky.cookie=true
- traefik.http.services.nextcloud-service.loadbalancer.sticky.cookie.name=nextcloud-sticker