Files
Huntarr.io/docker-compose.yml
Admin9705 aaadd164d8 Apply PR #750: Reduce zombie processes
Changes:
1. Add SIGCHLD handler to reap terminated child processes (zombies)
2. Replace curl healthcheck with Python requests to reduce process spawning
3. Update healthcheck to use /api/health endpoint

Technical details:
- SIGCHLD handler uses os.waitpid(-1, os.WNOHANG) pattern
- Python healthcheck reduces spawning of curl processes every 30s
- Proper exception handling for ChildProcessError and OSError
2026-01-22 18:31:11 -05:00

29 lines
860 B
YAML

services:
huntarr:
build:
context: .
dockerfile: Dockerfile
container_name: huntarr
ports:
- "9705:9705"
volumes:
- huntarr-config:/config
environment:
- TZ=${TZ:-UTC}
- BASE_URL=${BASE_URL:-}
restart: unless-stopped
# Graceful shutdown configuration
stop_signal: SIGTERM
stop_grace_period: 30s
# Health check configuration using Python to avoid spawning curl processes
# The SIGCHLD handler in main.py will reap any terminated health check processes
healthcheck:
test: ["CMD", "python3", "-c", "import requests; import sys; r = requests.get('http://localhost:9705/api/health', timeout=5); sys.exit(0 if r.status_code == 200 else 1)"]
interval: 30s
timeout: 10s
start_period: 40s
retries: 3
volumes:
huntarr-config:
name: huntarr-config