diff --git a/.gitignore b/.gitignore index ee1c255..8952c34 100644 --- a/.gitignore +++ b/.gitignore @@ -36,3 +36,6 @@ local-tools/ # Claude Code per-project state (permissions allowlist, etc.) .claude/ + +# HA dev instance — persisted config and secrets +ha_config/ diff --git a/docker-compose.yml b/docker-compose.yml index 769bb08..b935434 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,20 +1,19 @@ services: - smartthings-local: - build: . - container_name: smartthings-local - restart: unless-stopped - - # Bridge is outbound-only (DTLS UDP to each appliance, MQTT to the - # broker on 1883). No ports to expose. - + homeassistant: + image: ghcr.io/home-assistant/home-assistant:stable + container_name: localthings-ha + # host networking is required — DTLS runs over UDP and won't + # traverse Docker's bridge NAT to reach LAN appliances. + network_mode: host volumes: - # Holds the client cert + key. APPDATA_DIR comes from .env; - # on Unraid this is typically /mnt/user/appdata/smartthings-local/. - # Bare-metal dev falls back to ./certs alongside this compose file. - - ${APPDATA_DIR:-./certs}:/config:ro - - # All runtime config is in .env. env_file passes every variable - # straight into the container, so adding a new appliance is a - # .env edit only — no compose change. - env_file: - - .env + - ./ha_config:/config + - ./custom_components/localthings:/config/custom_components/localthings:ro + environment: + - TZ=America/Chicago + restart: unless-stopped + healthcheck: + test: ["CMD", "curl", "-f", "http://localhost:8123/"] + interval: 30s + timeout: 10s + retries: 5 + start_period: 60s