Port 8087 conflicted with zigbee2mqtt on piha (8087:8080 mapping active for 7+ days), preventing ha-diag-agent from starting. Grep across the full repo confirms no external consumer (no nginx/npm proxy, no Prometheus scrape, no control-plane reference) uses this port. The Docker healthcheck runs inside the container network namespace and does not require a host-side mapping. Internal FastAPI binding on 8087 is unchanged. Removed: ports section from docker-compose.yml and service.yaml. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
28 lines
758 B
YAML
28 lines
758 B
YAML
services:
|
|
ha-diag-agent:
|
|
build: .
|
|
container_name: ha-diag-agent
|
|
restart: unless-stopped
|
|
|
|
env_file:
|
|
- /opt/homelab/config/ha-diag-agent/.env
|
|
|
|
volumes:
|
|
# Events dir: host path includes node name; inside container always /events
|
|
- /opt/homelab/events/${NODE_NAME:-ha-diag}:/events
|
|
# SQLite baseline cache and check history
|
|
- /var/lib/ha-diag-agent:/data
|
|
# Optional YAML config (read-only)
|
|
- /opt/homelab/config/ha-diag-agent:/config:ro
|
|
|
|
healthcheck:
|
|
test:
|
|
- "CMD"
|
|
- "python"
|
|
- "-c"
|
|
- "import urllib.request; urllib.request.urlopen('http://localhost:8087/health', timeout=5)"
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 20s
|