ntfy/stack.production.yml

49 lines
1.7 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:
homepage.group: apps
homepage.name: ntfy
homepage.href: https://ntfy.nixc.us/
homepage.description: Ntfy
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: /data/cache.db
NTFY_AUTH_FILE: /data/auth.db
NTFY_AUTH_DEFAULT_ACCESS: deny-all
NTFY_BEHIND_PROXY: "true"
NTFY_ATTACHMENT_CACHE_DIR: /data/attachments
NTFY_ENABLE_LOGIN: "true"
NTFY_BASE_URL: https://ntfy.nixc.us
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