Skip to content

Instantly share code, notes, and snippets.

@k0ff33
Created February 7, 2023 19:30
Show Gist options
  • Save k0ff33/d4a06607ac821a3286e67619b69ea6e7 to your computer and use it in GitHub Desktop.
Save k0ff33/d4a06607ac821a3286e67619b69ea6e7 to your computer and use it in GitHub Desktop.
Docker Compose: Home Assistant with mosquitto & zigbee2mqtt (CC2652P)
version: '3.8'
services:
homeassistant:
container_name: homeassistant
image: "ghcr.io/home-assistant/home-assistant:stable"
ports:
- "8123:8123"
volumes:
- /var/docker/homeassistant:/config
- /etc/localtime:/etc/localtime:ro
restart: unless-stopped
privileged: true
network_mode: host
depends_on:
- zigbee2mqtt
devices:
# Make sure this matched your adapter location
- /dev/serial/by-id/usb-ITead_Sonoff_Zigbee_3.0_USB_Dongle_Plus_226d53c7709cec11aa3b654d73138bba-if00-port0:/dev/ttyUSB0
mqtt:
image: eclipse-mosquitto:2.0
restart: unless-stopped
volumes:
- "./mosquitto-data:/mosquitto"
ports:
- "1883:1883"
- "9001:9001"
command: "mosquitto -c /mosquitto-no-auth.conf"
zigbee2mqtt:
container_name: zigbee2mqtt
image: koenkk/zigbee2mqtt
restart: unless-stopped
volumes:
- /var/docker/zigbee2mqtt:/app/data
- /run/udev:/run/udev:ro
ports:
# Frontend port
- 8124:8080
environment:
- TZ=Europe/Warsaw
devices:
# Make sure this matched your adapter location
- /dev/serial/by-id/usb-ITead_Sonoff_Zigbee_3.0_USB_Dongle_Plus_226d53c7709cec11aa3b654d73138bba-if00-port0:/dev/ttyUSB0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment