39 lines
1.0 KiB
YAML
39 lines
1.0 KiB
YAML
services:
|
|
# Mosquitto MQTT Broker
|
|
mosquitto:
|
|
image: eclipse-mosquitto:latest
|
|
container_name: mosquitto
|
|
restart: unless-stopped
|
|
volumes:
|
|
- ./mosquitto/config:/mosquitto/config
|
|
- ./mosquitto/data:/mosquitto/data
|
|
- ./mosquitto/log:/mosquitto/log
|
|
ports:
|
|
- "1883:1883" # MQTT
|
|
- "9001:9001" # WebSocket (optional for some clients)
|
|
networks:
|
|
- zigbee_net
|
|
stdin_open: true
|
|
tty: true
|
|
|
|
# Zigbee2MQTT
|
|
zigbee2mqtt:
|
|
image: koenkk/zigbee2mqtt:latest
|
|
container_name: zigbee2mqtt
|
|
restart: unless-stopped
|
|
volumes:
|
|
- ./zigbee2mqtt/data:/app/data
|
|
- /run/udev:/run/udev:ro # Required for USB device access
|
|
devices:
|
|
- /dev/serial/by-id/usb-Itead_Sonoff_Zigbee_3.0_USB_Dongle_Plus_V2_f4a92cb1ce4bef11acf4b9a079f42d1b-if00-port0:/dev/ttyACM0 # Replace XXXXXX with your adapter ID
|
|
environment:
|
|
- TZ=Europe/Berlin # Set your timezone
|
|
depends_on:
|
|
- mosquitto
|
|
networks:
|
|
- zigbee_net
|
|
|
|
networks:
|
|
zigbee_net:
|
|
driver: bridge
|