Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Home Assistant docker-compose
---
version: '3.7'
services:
mqtt:
image: eclipse-mosquitto:latest
hostname: mqtt
init: yes
volumes:
- mosquitto_config:/mosquitto/config
- mosquitto_log:/mosquitto/log
- mosquitto_data:/mosquitto/data
ports:
- "1883:1883"
- "9001:9001"
environment:
TZ: "${TZ:-Europe/Berlin}"
restart: on-failure
deploy:
mode: global
restart_policy:
condition: any
delay: 5s
max_attempts: 3
window: 120s
homeassistant:
image: homeassistant/raspberrypi2-homeassistant
init: yes
hostname: homeassistant
volumes:
- homeassistant_config:/config
environment:
TZ: "${TZ:-Europe/Berlin}"
network_mode: host
ports:
- "80:8132"
depends_on:
- mqtt
restart: on-failure
deploy:
mode: global
restart_policy:
condition: any
delay: 5s
max_attempts: 3
window: 120s
volumes:
homeassistant_config:
external: true
mosquitto_config:
external: true
mosquitto_data:
external: true
mosquitto_log:
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment