docker-compose v1 (1.29.2 on chelsty-infra) raises InvalidArgument when network_mode: host is combined with port_bindings from the base compose file. Add ports: [] in the override to clear the base ports list. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
21 lines
853 B
YAML
21 lines
853 B
YAML
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: []
|
|
volumes:
|
|
# configuration.yaml lives in the runtime config dir (not in Git).
|
|
# On chelsty-infra: /opt/homelab/config/zigbee2mqtt/configuration.yaml
|
|
- /opt/homelab/config/zigbee2mqtt/configuration.yaml:/app/data/configuration.yaml:ro
|
|
environment:
|
|
- TZ=Europe/Warsaw
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "wget -qO- http://localhost:8080 > /dev/null 2>&1 || exit 1"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 60s
|