Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
version: '2.1'
services:
esphomeyaml:
image: ottowinter/esphomeyaml:latest
container_name: esphomeyaml
command: esphomeyaml dashboard
restart: always
ports:
- 6052:6052
- 6123:6123
volumes:
- esphomeyaml:/config:rw
environment:
- TZ=Australia/Perth
mqtt:
image: eclipse-mosquitto:latest
container_name: "mqtt"
restart: always
ports:
- 1883:1883
- 9001:9001
volumes:
- mqtt-data:/mosquitto/data:rw
- mqtt-config:/mosquitto/config:ro
- mqtt-log:/mosquitto/log:rw
- mqtt-cert:/mosquitto/config/cert:ro
- mqtt-passwd:/mosquitto/config/passwd:ro
environment:
- TZ=Australia/Perth
grafana:
image: grafana/grafana:latest
container_name: "grafana"
depends_on:
influxdb:
condition: service_healthy
environment:
- TZ=Australia/Perth
- PGID=1000
- PUID=1000
ports:
- 3000:3000
restart: on-failure
volumes:
- grafana:/var/lib/grafana:rw
nodered:
image: nodered/node-red:latest
container_name: "nodered"
restart: always
ports:
- 1880:1880
volumes:
- nodered:/data:rw
environment:
- TZ=Australia/Perth
influxdb:
image: influxdb:latest
container_name: "influxdb"
healthcheck:
test: ["CMD", "curl", "-sI", "http://127.0.0.1:8086/ping"]
interval: 30s
timeout: 1s
retries: 24
environment:
- TZ=Australia/Perth
ports:
- 8083:8083
- 8086:8086
restart: on-failure
volumes:
- influxdb:/var/lib/influxdb:rw
home-assistant:
#image: homeassistant/home-assistant:rc
image: homeassistant/home-assistant:latest
container_name: "homeassistant"
restart: always
depends_on:
influxdb:
condition: service_healthy
mqtt:
condition: service_started
healthcheck:
test: ["CMD", "curl", "-f", "http://{homeassistantIP}:8123"]
interval: 30s
timeout: 10s
retries: 6
ports:
- 8123:8123
volumes:
- homeassistant-config:/config:rw
environment:
- TZ=Australia/Perth
devices:
- "/dev/ttyACM0:/dev/ttyACM0:rwm"
mariadb:
image: mariadb:latest
container_name: mariadb
restart: always
healthcheck:
test: ["CMD", "/usr/bin/mysql --user=foo_db_ser --password=foo_db --execute \"SHOW DATABASES;\""]
# test: ["CMD", "/usr/local/mysql/bin/mysql --user=foo --password=foo --execute \"SHOW DATABASES;\""]
interval: 3s
timeout: 1s
retries: 5
environment:
- MYSQL_ROOT_PASSWOR=root_user_passwd
- MYSQL_DATABASE=foo_db
- MYSQL_USER=foo_db_user
- MYSQL_PASSWORD=foo_user_passwd
- TZ=Australia/Perth
volumes:
- mysql-db:/var/lib/mysql:rw
- mysql-log:/var/log/mysql:rw
- my.cnf:/root/.my.cnf:rp
chronograf:
image: chronograf
volumes:
- chronograf:/var/lib/chronograf
ports:
- "10000:10000"
links:
- influxdb
# Define a Kapacitor service
kapacitor:
image: kapacitor
environment:
KAPACITOR_HOSTNAME: kapacitor
KAPACITOR_INFLUXDB_0_URLS_0: http://influxdb:8086
volumes:
- kapacitor:/var/lib/kapacitor
links:
- influxdb
ports:
- "9092:9092"
# Define a service for using the influx CLI tool.
# docker-compose run influxdb-cli
influxdb-cli:
image: influxdb
entrypoint:
- influx
- -host
- influxdb
links:
- influxdb
# Define a service for using the kapacitor CLI tool.
# docker-compose run kapacitor-cli
kapacitor-cli:
image: kapacitor
entrypoint: bash
environment:
KAPACITOR_URL: http://kapacitor:9092
links:
- kapacitor
volumes:
Kapacitor:
chronograf:
mysql-log:
my.cnf:
mysql-db:
homeassistant-config:
dasher-config:
influxdb:
grafana:
mqtt-data:
mqtt-log:
mqtt-config:
mqtt-cert:
mqtt-passwd:
esphomeyaml:
muximux:
nodered:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment