From 6953815f416758440855a8e965056aa1846014b9 Mon Sep 17 00:00:00 2001 From: Oskar Kapala Date: Wed, 3 Jun 2026 19:19:27 +0200 Subject: [PATCH] feat(ha-diag-agent): add piha deploy config - hosts/piha/runtime/ha-diag-agent/docker-compose.override.yml: mem_limit 128m, hardcoded events volume (/opt/homelab/events/piha:/events) to avoid ${NODE_NAME} shell-expansion issue in deploy-node.sh - services/ha-diag-agent/env.example: per-host HA_URL comments (piha vs chelsty-infra tailscale), HA_TOKEN source note Co-Authored-By: Claude Sonnet 4.6 --- .../runtime/ha-diag-agent/docker-compose.override.yml | 10 ++++++++++ services/ha-diag-agent/env.example | 7 +++++-- 2 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 hosts/piha/runtime/ha-diag-agent/docker-compose.override.yml diff --git a/hosts/piha/runtime/ha-diag-agent/docker-compose.override.yml b/hosts/piha/runtime/ha-diag-agent/docker-compose.override.yml new file mode 100644 index 0000000..4d50b5a --- /dev/null +++ b/hosts/piha/runtime/ha-diag-agent/docker-compose.override.yml @@ -0,0 +1,10 @@ +services: + ha-diag-agent: + # Pin events to the piha-specific subdirectory; overrides the ${NODE_NAME} + # variable substitution in the base compose file which requires a shell env var. + volumes: + - /opt/homelab/events/piha:/events + - /var/lib/ha-diag-agent:/data + - /opt/homelab/config/ha-diag-agent:/config:ro + mem_limit: 128m + restart: unless-stopped diff --git a/services/ha-diag-agent/env.example b/services/ha-diag-agent/env.example index ab1f75f..501df4f 100644 --- a/services/ha-diag-agent/env.example +++ b/services/ha-diag-agent/env.example @@ -2,11 +2,14 @@ # Copy to /opt/homelab/config/ha-diag-agent/.env on the target node # Home Assistant connection (required) -HA_URL=http://homeassistant.local:8123 +# piha: HA_URL=http://localhost:8123 +# chelsty-infra: HA_URL=http://100.70.180.90:8123 (chelsty-ha Tailscale IP) +HA_URL=http://localhost:8123 +# Obtain from HA UI: Settings → People → → Long-Lived Access Tokens HA_TOKEN=your-long-lived-token-here HA_TIMEOUT=10.0 -# Node identity +# Node identity (must match the node's canonical name in the homelab inventory) NODE_NAME=piha LOCATION_TAG=ken