services: ntfy: image: binwiederhier/ntfy:v2.23 container_name: ntfy command: - serve volumes: - /appli/data/ntfy/data:/var/cache/ntfy environment: - TZ=Europe/Paris - NTFY_BASE_URL=https://${URL} - NTFY_CACHE_FILE=/var/cache/ntfy/cache.db - NTFY_AUTH_FILE=/var/cache/ntfy/auth.db - NTFY_ATTACHMENT_CACHE_DIR=/var/cache/ntfy/attachments - NTFY_AUTH_DEFAULT_ACCESS=deny-all - NTFY_BEHIND_PROXY=true - NTFY_ENABLE_LOGIN=true user: 1000:1000 networks: - web labels: - traefik.enable=true - traefik.http.routers.ntfy.rule=Host(`${URL}`) - traefik.http.routers.ntfy.entrypoints=https - traefik.http.routers.ntfy.tls.certresolver=letsencrypt - traefik.http.services.ntfy.loadbalancer.server.port=80 healthcheck: test: ["CMD-SHELL", "wget -q --tries=1 http://ntfy:80/v1/health -O - | grep -Eo '\"healthy\"\\s*:\\s*true' || exit 1"] interval: 60s timeout: 10s retries: 3 start_period: 40s restart: unless-stopped networks: web: external: true