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:
|
light:
|
||||||
- platform: flux_led
|
- platform: flux_led
|
||||||
automatic_add: true
|
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
|
restart: unless-stopped
|
||||||
depends_on:
|
depends_on:
|
||||||
- influxdb
|
- influxdb
|
||||||
|
- db
|
||||||
labels:
|
labels:
|
||||||
- traefik.enable=true
|
- traefik.enable=true
|
||||||
- traefik.http.routers.homeassistant.rule=Host(`homeassistant.jakehoward.tech`)
|
- traefik.http.routers.homeassistant.rule=Host(`homeassistant.jakehoward.tech`)
|
||||||
|
@ -40,6 +41,17 @@ services:
|
||||||
volumes:
|
volumes:
|
||||||
- ./esphome:/config
|
- ./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:
|
networks:
|
||||||
grafana:
|
grafana:
|
||||||
external: true
|
external: true
|
||||||
|
|
Loading…
Reference in a new issue