infrastructure/ansible/roles/home_assistant/files/docker-compose.yml

58 lines
1.4 KiB
YAML

version: "2.3"
services:
homeassistant:
image: homeassistant/home-assistant:stable
network_mode: host
volumes:
- "{{ app_data_dir }}/home-assistant:/config"
environment:
- TZ=Europe/London
restart: unless-stopped
depends_on:
- influxdb
- db
labels:
- traefik.enable=true
- traefik.http.routers.homeassistant.rule=Host(`homeassistant.jakehoward.tech`)
- traefik.http.routers.homeassistant.tls.certresolver=le
- traefik.http.services.home-assistant-homeassistant.loadbalancer.server.port=8123
- traefik.http.routers.homeassistant.middlewares=compress@file
influxdb:
image: influxdb:1.8-alpine
restart: unless-stopped
volumes:
- /mnt/tank/dbs/influx/home-assistant:/var/lib/influxdb
ports:
- 127.0.0.1:48086:8086
networks:
default:
grafana:
aliases:
- ha-influxdb
environment:
- INFLUXDB_DB=home_assistant
- INFLUXDB_HTTP_AUTH_ENABLED=
esphome:
image: esphome/esphome:latest
restart: unless-stopped
network_mode: host
volumes:
- "{{ app_data_dir }}/esphome:/config"
db:
image: postgres:12-alpine
restart: unless-stopped
ports:
- 127.0.0.1:45432:5432
volumes:
- /mnt/tank/dbs/postgres/home-assistant:/var/lib/postgresql/data
environment:
- POSTGRES_PASSWORD=home-assistant
- POSTGRES_USER=home-assistant
networks:
grafana:
external: true