From c89715c52b06dd8276dd25581b9ad02cbaab4a2d Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Sat, 27 Jun 2020 16:34:41 +0100 Subject: [PATCH] Add influxdb for homeassistant storage --- ansible/roles/home-assistant/files/configuration.yml | 3 +++ ansible/roles/home-assistant/files/docker-compose.yml | 10 ++++++++++ 2 files changed, 13 insertions(+) diff --git a/ansible/roles/home-assistant/files/configuration.yml b/ansible/roles/home-assistant/files/configuration.yml index 2c74ee6..ea8fa9f 100644 --- a/ansible/roles/home-assistant/files/configuration.yml +++ b/ansible/roles/home-assistant/files/configuration.yml @@ -13,3 +13,6 @@ scene: !include scenes.yaml homeassistant: auth_mfa_modules: - type: totp + +influxdb: + host: influxdb diff --git a/ansible/roles/home-assistant/files/docker-compose.yml b/ansible/roles/home-assistant/files/docker-compose.yml index 276670c..dd9cb62 100644 --- a/ansible/roles/home-assistant/files/docker-compose.yml +++ b/ansible/roles/home-assistant/files/docker-compose.yml @@ -10,8 +10,18 @@ services: environment: - TZ=Europe/London restart: unless-stopped + depends_on: + - influxdb 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 + + influxdb: + image: influxdb:1.8-alpine + restart: unless-stopped + volumes: + - ./influxdb:/var/lib/influxdb + environment: + - INFLUXDB_DB=home_assistant