2023-07-26 00:09:48 +02:00
|
|
|
services:
|
|
|
|
#Conteneur Home Assistant
|
|
|
|
homeassistant:
|
|
|
|
image: homeassistant/home-assistant:stable
|
|
|
|
container_name: homeassistant
|
|
|
|
environment:
|
|
|
|
- TZ=Europe/Paris
|
|
|
|
ports:
|
2024-12-15 21:27:32 +01:00
|
|
|
#Le port sur lequel sera accessible l'interface web PORT_EXPORTE:PORT_CONTENEUR
|
2023-07-26 00:09:48 +02:00
|
|
|
- 8123:8123
|
|
|
|
#On définit un "bind mount" pour conserver la configuration de Home-Assistant
|
|
|
|
volumes:
|
|
|
|
- ./home-assistant:/config
|
2024-12-15 21:27:32 +01:00
|
|
|
restart: unless-stopped
|
2023-07-26 00:09:48 +02:00
|
|
|
|
|
|
|
#Conteneur du broker MQTT Mosquitto
|
|
|
|
mosquitto:
|
|
|
|
image: eclipse-mosquitto
|
|
|
|
container_name: mqtt
|
|
|
|
#Pas besoin d'exporter de port vers l'extérieur
|
|
|
|
#ports:
|
|
|
|
# - 1883:1883
|
|
|
|
volumes:
|
2024-12-15 21:27:32 +01:00
|
|
|
#Bind mount pour la configuration
|
2023-07-26 00:09:48 +02:00
|
|
|
- ./mosquitto/config:/mosquitto/config
|
2024-12-15 21:27:32 +01:00
|
|
|
#logs et les données persistantes
|
|
|
|
- ./mosquitto/data:/mosquitto/data
|
|
|
|
- ./mosquitto/log:/mosquitto/log
|
|
|
|
restart: unless-stopped
|
2023-07-26 00:09:48 +02:00
|
|
|
|
|
|
|
#Conteneur ZigBee2MQTT
|
|
|
|
zigbee2mqtt:
|
|
|
|
image: koenkk/zigbee2mqtt
|
|
|
|
container_name: zigbee2mqtt
|
|
|
|
depends_on:
|
2024-12-15 21:27:32 +01:00
|
|
|
#Le conteneur mosquitto doit être démarré pour lancer le conteneur ZigBee2MQTT
|
2023-07-26 00:09:48 +02:00
|
|
|
- mosquitto
|
|
|
|
volumes:
|
|
|
|
- ./zigbee2mqtt:/app/data
|
|
|
|
- /run/udev:/run/udev:ro
|
|
|
|
ports:
|
2024-12-15 21:27:32 +01:00
|
|
|
#Port Zigbee2MQTT
|
2023-07-26 00:09:48 +02:00
|
|
|
- 8080:8080
|
|
|
|
devices:
|
2024-12-15 21:27:32 +01:00
|
|
|
#Adresse de votre dongle usb ZigBee à changer par la votre (uniquement avant les ':')
|
2023-07-26 00:09:48 +02:00
|
|
|
- /dev/ttyUSB0:/dev/ttyUSB0
|
|
|
|
restart: unless-stopped
|