diff --git a/hosts/chelsty-infra/runtime/zigbee2mqtt/docker-compose.override.yml b/hosts/chelsty-infra/runtime/zigbee2mqtt/docker-compose.override.yml index 09335ad..e2a3c53 100644 --- a/hosts/chelsty-infra/runtime/zigbee2mqtt/docker-compose.override.yml +++ b/hosts/chelsty-infra/runtime/zigbee2mqtt/docker-compose.override.yml @@ -1,11 +1,11 @@ services: zigbee2mqtt: - # host network: mosquitto runs with network_mode: host on chelsty-infra, - # so zigbee2mqtt must also use host networking to reach localhost:1883. - network_mode: host - # Clear the ports list from the base compose — host networking makes port - # mappings meaningless and docker-compose v1 errors if both are present. - ports: [] + # mosquitto runs with network_mode: host on chelsty-infra. + # extra_hosts maps the 'mosquitto' hostname to the host gateway IP so that + # mqtt://mosquitto:1883 in configuration.yaml reaches the host-networked + # mosquitto process. Works with docker-compose v1 (docker 20.10+). + extra_hosts: + - "mosquitto:host-gateway" volumes: # configuration.yaml lives in the runtime config dir (not in Git). # On chelsty-infra: /opt/homelab/config/zigbee2mqtt/configuration.yaml