Add self-hosted ntfy deployment for ntfy.schwenk.online.

Docker Compose with Traefik routing, auth-enabled server config, and local cache volume.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Frank Schwenk
2026-07-06 11:12:14 +02:00
commit e285b23534
3 changed files with 73 additions and 0 deletions
+38
View File
@@ -0,0 +1,38 @@
services:
ntfy:
image: binwiederhier/ntfy
container_name: ntfy.schwenk.online
command:
- serve
environment:
- TZ=Europe/Berlin
user: 1002:1002
volumes:
- ./cache:/var/cache/ntfy
- ./config:/etc/ntfy
- /etc/localtime:/etc/localtime:ro
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
restart: unless-stopped
init: true
networks:
- traefik
labels:
- "traefik.enable=true"
- "traefik.http.routers.ntfyschwenkonline.rule=Host(`ntfy.schwenk.online`)"
- "traefik.http.routers.ntfyschwenkonline.entrypoints=websecure"
- "traefik.http.routers.ntfyschwenkonline.tls.certresolver=myresolver"
- "traefik.http.services.ntfyschwenkonline.loadbalancer.server.port=80"
# HSTS at TLS terminator (Traefik)
- "traefik.http.middlewares.ntfyschwenkonline-headers.headers.stsSeconds=31536000"
- "traefik.http.middlewares.ntfyschwenkonline-headers.headers.stsIncludeSubdomains=true"
- "traefik.http.routers.ntfyschwenkonline.middlewares=ntfyschwenkonline-headers"
networks:
traefik:
external: true