Skip to content

Instantly share code, notes, and snippets.

@tonyfg
Created November 18, 2020 11:27
Show Gist options
  • Save tonyfg/2864e038a41b11f4a6625d3405553675 to your computer and use it in GitHub Desktop.
Save tonyfg/2864e038a41b11f4a6625d3405553675 to your computer and use it in GitHub Desktop.
Docker compose file for home assistant + domoticz + mosquitto + zigbee2mqtt
version: "3"
services:
domoticz:
image: linuxserver/domoticz:latest
container_name: domoticz
environment:
- PUID=19000
- PGID=19000
- TZ=Europe/Lisbon
volumes:
- /opt/my-containers/domoticz/domoticz_data:/config
expose:
- 1883
ports:
- 8080:8080
- 6144:6144
- 1443:1443
restart: unless-stopped
home_assistant:
image: homeassistant/home-assistant:latest
container_name: home_assistant
environment:
- TZ=Europe/Lisbon
volumes:
- ./hass_data:/config
# init: true
network_mode: host
restart: unless-stopped
# This container receives messages from zigbee2mqtt and forwards them to HASS / domoticz
mosquitto:
image: eclipse-mosquitto:latest
container_name: mosquitto
volumes:
- /opt/my-containers/domoticz/mosquitto_data/data:/mosquitto/data
- /opt/my-containers/domoticz/mosquitto_data/log:/mosquitto/log
expose:
- 1883
- 9001
restart: unless-stopped
# This container interfaces with the Zigbee-USB CC2531 adapter and sends MQTT messages to mosquitto
zigbee2mqtt:
image: koenkk/zigbee2mqtt:latest
container_name: zigbee2mqtt
environment:
- TZ=Europe/Lisbon
volumes:
- /opt/my-containers/domoticz/zigbee2mqtt_data:/app/data
- /run/udev:/run/udev:ro
devices:
- /dev/ttyACM0:/dev/ttyACM0
restart: unless-stopped
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment