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/ntfy/docker-stack.yml
2023-05-10 15:55:57 +02:00

48 lines
1.2 KiB
YAML

version: "3"
networks:
traefik:
external: true
configs:
server:
file: /srv/ntfy/server.yml
services:
ntfy:
image: binwiederhier/ntfy
networks:
- traefik
command:
- serve
environment:
- TZ=Europe/Amsterdam
volumes:
- type: bind
source: /mnt/data/ntfy/cache
target: /var/cache/ntfy
- type: bind
source: /mnt/data/ntfy/data
target: /var/lib/ntfy
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
deploy:
placement:
constraints:
- node.role == manager
labels:
- traefik.enable=true
- traefik.http.routers.ntfy.entrypoints=websecure
- traefik.http.routers.ntfy.rule=Host(`ntfy.pim.kunis.nl`)
- traefik.http.routers.ntfy.tls=true
- traefik.http.routers.ntfy.tls.certresolver=letsencrypt
- traefik.http.routers.ntfy.service=ntfy
- traefik.http.services.ntfy.loadbalancer.server.port=80
- traefik.docker.network=traefik
configs:
- source: server
target: /etc/ntfy/server.yml