37 lines
907 B
YAML
37 lines
907 B
YAML
version: "3"
|
|
services:
|
|
mqtt:
|
|
container_name: mosquitto
|
|
image: eclipse-mosquitto
|
|
restart: unless-stopped
|
|
volumes:
|
|
- /etc/localtime:/etc/localtime:ro
|
|
- /etc/timezone:/etc/timezone:ro
|
|
- ./mosquitto:/mosquitto
|
|
healthcheck:
|
|
test: ["CMD", "mosquitto_sub", "-t", "$$SYS/#", "-C", "1", "-i", "healthcheck", "-W", "3"]
|
|
start_period: 15s
|
|
start_interval: 1s
|
|
interval: 5s
|
|
timeout: 10s
|
|
retries: 5
|
|
|
|
z2m:
|
|
container_name: zigbee2mqtt
|
|
image: koenkk/zigbee2mqtt
|
|
restart: unless-stopped
|
|
depends_on:
|
|
mqtt:
|
|
condition: service_healthy
|
|
volumes:
|
|
- /etc/localtime:/etc/localtime:ro
|
|
- /etc/timezone:/etc/timezone:ro
|
|
- ./zigbee2mqtt:/app/data
|
|
- /run/udev:/run/udev:ro
|
|
ports:
|
|
- 8080:8080
|
|
devices:
|
|
- /dev/ttyUSB0:/dev/ttyUSB0
|
|
privileged: true
|
|
# group_add:
|
|
# - nobody |