homelab-codex-ws/services/ha-diag-agent/docker-compose.yml
Oskar Kapala ab8895d28b feat(ha-diag-agent): scaffold service with HA REST client and event emitter
- new per-host service, follows node-agent pattern
- 7 new HA event types defined (routing in supervisor — Phase 5)
- HeartbeatCheck as pipeline validator (pings /api/, emits ha_websocket_dead)
- service.yaml + host configs for piha (ken) and chelsty-infra (chelsty)
- test scaffolding with aiohttp/aiosqlite mocks (15/15 passing)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-29 12:26:34 +02:00

31 lines
790 B
YAML

services:
ha-diag-agent:
build: .
container_name: ha-diag-agent
restart: unless-stopped
env_file:
- /opt/homelab/config/ha-diag-agent/.env
ports:
- "8087:8087"
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