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/alerts/docker-stack.yml
Pim Kunis 047ee4388b rename ntfy stack to alerts
add apprise service to alerts stack
2023-05-10 17:36:38 +02:00

70 lines
1.9 KiB
YAML

version: "3"
networks:
traefik:
external: true
configs:
server:
file: /srv/alerts/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
apprise:
image: caronc/apprise:v0.9.0
networks:
- traefik
volumes:
- type: bind
source: /mnt/data/apprise
target: /config
deploy:
placement:
constraints:
- node.role == manager
labels:
- traefik.enable=true
- traefik.http.routers.apprise.entrypoints=localsecure
- traefik.http.routers.apprise.rule=Host(`apprise.pim.kunis.nl`)
- traefik.http.routers.apprise.tls=true
- traefik.http.routers.apprise.tls.certresolver=letsencrypt
- traefik.http.routers.apprise.service=apprise
- traefik.http.services.apprise.loadbalancer.server.port=8000
- traefik.docker.network=traefik