ntfy/compose.yml
2025-03-06 23:10:23 -03:00

52 lines
1.5 KiB
YAML

---
version: "3.8"
services:
app:
image: binwiederhier/ntfy:v2.11.0
command:
- serve
environment:
- TZ=${TZ:-UTC}
networks:
- proxy
deploy:
restart_policy:
condition: on-failure
labels:
- "traefik.enable=true"
- "traefik.http.services.${STACK_NAME}.loadbalancer.server.port=80"
- "traefik.http.routers.${STACK_NAME}.rule=Host(`${DOMAIN}`${EXTRA_DOMAINS})"
- "traefik.http.routers.${STACK_NAME}.entrypoints=web-secure"
- "traefik.http.routers.${STACK_NAME}.tls.certresolver=${LETS_ENCRYPT_ENV}"
- "traefik.http.middlewares.${STACK_NAME}-redirect.headers.SSLForceHost=true"
- "traefik.http.middlewares.${STACK_NAME}-redirect.headers.SSLHost=${DOMAIN}"
- "coop-cloud.${STACK_NAME}.version="
- "backupbot.backup=${ENABLE_BACKUPS:-true}"
healthcheck:
test: ["CMD-SHELL", "wget -q --tries=1 http://localhost:80/v1/health -O - | grep -Eq '\"healthy\"\\s*:\\s*true'"]
interval: 30s
timeout: 10s
retries: 10
start_period: 1m
volumes:
- ntfy_etc:/etc/ntfy
- ntfy_cache:/var/cache/ntfy
- ntfy_lib:/var/lib/ntfy
configs:
- source: server_yml
target: /etc/ntfy/server.yml
mode: 0440
networks:
proxy:
external: true
volumes:
ntfy_etc:
ntfy_cache:
ntfy_lib:
configs:
server_yml:
name: ${STACK_NAME}_server_yml_${SERVER_YML_VERSION}
file: server.yml.tmpl
template_driver: golang