Last active
April 27, 2023 23:58
-
-
Save indiejoseph/c3b9d6f9f0db62847b0bfcda34837033 to your computer and use it in GitHub Desktop.
Docker compose for Home Assistant
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "3" | |
services: | |
homeassistant: | |
container_name: homeassistant | |
image: homeassistant/home-assistant:latest | |
restart: unless-stopped | |
volumes: | |
- ./homeassistant/config:/config | |
- /etc/localtime:/etc/localtime:ro | |
ports: | |
- "8123:8123" | |
environment: | |
TZ: ${TZ} | |
PUID: 1000 | |
PGID: 1000 | |
depends_on: | |
- mosquitto | |
- mariadb | |
mosquitto: | |
container_name: mosquitto | |
image: eclipse-mosquitto:latest | |
restart: unless-stopped | |
ports: | |
- 1883:1883 | |
- 9001:9001 | |
volumes: | |
- /etc/localtime:/etc/localtime:ro | |
- ./mosquitto/config:/mosquitto/config | |
- ./mosquitto/data:/mosquitto/data | |
- ./mosquitto/log:/mosquitto/log | |
environment: | |
TZ: ${TZ} | |
mariadb: | |
container_name: mariadb | |
image: bianjp/mariadb-alpine:latest | |
restart: unless-stopped | |
ports: | |
- "3306:3306/tcp" | |
volumes: | |
- ./mariadb/config:/etc/mysql/conf.d | |
- ./mariadb/data:/var/lib/mysql | |
environment: | |
TZ: ${TZ} | |
MYSQL_ROOT_PASSWORD: root | |
MYSQL_DATABASE: homeassistant | |
MYSQL_USER: homeassistant | |
MYSQL_PASSWORD: homeassistant | |
dockermon: | |
image: philhawthorne/ha-dockermon | |
container_name: dockermon | |
restart: unless-stopped | |
volumes: | |
- /var/run/docker.sock:/var/run/docker.sock | |
- ./dockermon/config:/config | |
ports: | |
- 8126:8126 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
persistence true | |
persistence_location /mosquitto/data/ | |
log_dest file /mosquitto/log/mosquitto.log |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment