ntfy/stack.production.yml

44 lines
1.6 KiB
YAML

version: "3.8"
services:
ntfy:
image: git.nixc.us/colin/ntfy:production
volumes:
- /mnt/tank/persist/nixc.us/ntfy/production/data:/data
deploy:
replicas: 1
placement:
constraints:
- node.hostname == macmini14
labels:
- "us.nixc.autodeploy=true"
- "traefik.enable=true"
- "traefik.http.routers.production-ntfy_ntfy.tls=true"
- "traefik.http.services.production-ntfy_ntfy.loadbalancer.server.port=80"
- "traefik.http.routers.production-ntfy_ntfy.rule=Host(`ntfy.nixc.us`)"
- "traefik.http.routers.production-ntfy_ntfy.entrypoints=websecure"
- "traefik.http.routers.production-ntfy_ntfy.tls.certresolver=letsencryptresolver"
- "traefik.http.routers.production-ntfy_ntfy.service=production-ntfy_ntfy"
- "traefik.docker.network=traefik"
# - 'traefik.http.routers.production-ntfy_ntfy.middlewares=authelia@docker'
networks:
- traefik
environment:
NTFY_LISTEN_ADDR: 0.0.0.0:80
NTFY_DATA_DIR: /data
NTFY_CACHE_FILE: /var/lib/ntfy/cache.db
NTFY_AUTH_FILE: /var/lib/ntfy/auth.db
NTFY_AUTH_DEFAULT_ACCESS: deny-all
NTFY_BEHIND_PROXY: "true"
NTFY_ATTACHMENT_CACHE_DIR: /var/lib/ntfy/attachments
NTFY_ENABLE_LOGIN: "true"
command:
- serve
healthcheck:
test: ["CMD-SHELL", "wget -q --tries=1 http://localhost:80/v1/health -O - | grep -Eo '\"healthy\"\\s*:\\s*true' || exit 1"]
interval: 60s
timeout: 10s
retries: 3
start_period: 40s
networks:
traefik:
external: true