zigbee2mqtt: config goes in data dir (writable), not separate ro mount
z2m migrates configuration.yaml on startup and needs write access. Remove the separate :ro config mount; rely on the base compose's /opt/homelab/data/zigbee2mqtt/data:/app/data read-write mount instead. configuration.yaml must exist at that path on the node before first run. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
b3912fe0ce
commit
410bfe7065
|
|
@ -3,13 +3,9 @@ services:
|
||||||
# mosquitto runs with network_mode: host on chelsty-infra.
|
# mosquitto runs with network_mode: host on chelsty-infra.
|
||||||
# extra_hosts maps the 'mosquitto' hostname to the host gateway IP so that
|
# extra_hosts maps the 'mosquitto' hostname to the host gateway IP so that
|
||||||
# mqtt://mosquitto:1883 in configuration.yaml reaches the host-networked
|
# mqtt://mosquitto:1883 in configuration.yaml reaches the host-networked
|
||||||
# mosquitto process. Works with docker-compose v1 (docker 20.10+).
|
# mosquitto process. Requires Docker 20.10+ (present on chelsty-infra).
|
||||||
extra_hosts:
|
extra_hosts:
|
||||||
- "mosquitto:host-gateway"
|
- "mosquitto:host-gateway"
|
||||||
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:
|
environment:
|
||||||
- TZ=Europe/Warsaw
|
- TZ=Europe/Warsaw
|
||||||
healthcheck:
|
healthcheck:
|
||||||
|
|
@ -17,4 +13,9 @@ services:
|
||||||
interval: 30s
|
interval: 30s
|
||||||
timeout: 10s
|
timeout: 10s
|
||||||
retries: 3
|
retries: 3
|
||||||
start_period: 60s
|
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.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue