Use postgres on homeassistant

This commit is contained in:
Jake Howard 2020-08-30 16:58:27 +01:00
parent ec751ffa1a
commit 3d76c48bbf
Signed by: jake
GPG key ID: 57AFB45680EDD477
2 changed files with 15 additions and 0 deletions

View file

@ -21,3 +21,6 @@ influxdb:
light:
- platform: flux_led
automatic_add: true
recorder:
db_url: postgres://home-assistant:home-assistant@127.0.0.1:45432/home-assistant

View file

@ -11,6 +11,7 @@ services:
restart: unless-stopped
depends_on:
- influxdb
- db
labels:
- traefik.enable=true
- traefik.http.routers.homeassistant.rule=Host(`homeassistant.jakehoward.tech`)
@ -40,6 +41,17 @@ services:
volumes:
- ./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