Files
docker-compose-files/ntfy/docker-compose.yml
2025-12-14 21:01:14 -05:00

20 lines
882 B
YAML

services:
ntfy:
image: binwiederhier/ntfy:latest
container_name: ntfy
command: - serve # Explicitly tells the container to run the ntfy server
environment:
- TZ=UTC # optional: set desired timezone (e.g., Asia/Kolkata)
user: UID:GID # optional: replace with your own user/group or uid/gid
volumes:
- ./cache:/var/cache/ntfy # Maps host directory for persistent cache
- ./config:/etc/ntfy # Maps host directory for config files (e.g., server.yml)
ports:
- '8082:80' # Maps host port 8082 to container port 80 (default HTTP)
healthcheck: # Optional: defines a health check for the service
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