Use postgres on homeassistant
This commit is contained in:
parent
ec751ffa1a
commit
3d76c48bbf
2 changed files with 15 additions and 0 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue