e285b23534
Docker Compose with Traefik routing, auth-enabled server config, and local cache volume. Co-authored-by: Cursor <cursoragent@cursor.com>
39 lines
1.3 KiB
YAML
39 lines
1.3 KiB
YAML
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
|