2026-05-11 21:36:10 +02:00
|
|
|
services:
|
|
|
|
|
zigbee2mqtt:
|
2026-05-27 15:12:33 +02:00
|
|
|
# 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
|
2026-05-27 15:13:33 +02:00
|
|
|
# mosquitto process. Requires Docker 20.10+ (present on chelsty-infra).
|
2026-05-27 15:12:33 +02:00
|
|
|
extra_hosts:
|
|
|
|
|
- "mosquitto:host-gateway"
|
2026-05-11 21:36:10 +02:00
|
|
|
environment:
|
2026-05-27 15:10:48 +02:00
|
|
|
- TZ=Europe/Warsaw
|
2026-05-11 21:36:10 +02:00
|
|
|
healthcheck:
|
2026-05-27 15:10:48 +02:00
|
|
|
test: ["CMD-SHELL", "wget -qO- http://localhost:8080 > /dev/null 2>&1 || exit 1"]
|
|
|
|
|
interval: 30s
|
|
|
|
|
timeout: 10s
|
2026-05-11 21:36:10 +02:00
|
|
|
retries: 3
|
2026-05-27 15:13:33 +02:00
|
|
|
start_period: 90s
|
|
|
|
|
# Note: volumes NOT overridden here.
|
|
|
|
|
# The base docker-compose.yml mounts /opt/homelab/data/zigbee2mqtt/data:/app/data
|
|
|
|
|
# (read-write). configuration.yaml must be placed in that directory on the node:
|
|
|
|
|
# /opt/homelab/data/zigbee2mqtt/data/configuration.yaml
|
|
|
|
|
# z2m rewrites this file during migrations — read-only mount is not viable.
|