From e4aba817cca26fa6debfe3468955ed0d47ba4bfe Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Sat, 27 Jun 2020 21:00:07 +0100 Subject: [PATCH] Fix influxdb comms Stupid host network mode and DNS --- ansible/roles/home-assistant/files/configuration.yml | 3 ++- ansible/roles/home-assistant/files/docker-compose.yml | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ansible/roles/home-assistant/files/configuration.yml b/ansible/roles/home-assistant/files/configuration.yml index 06ea953..4ee818e 100644 --- a/ansible/roles/home-assistant/files/configuration.yml +++ b/ansible/roles/home-assistant/files/configuration.yml @@ -15,7 +15,8 @@ homeassistant: - type: totp influxdb: - host: influxdb + host: host.docker.internal + port: 48086 person: - name: Jake diff --git a/ansible/roles/home-assistant/files/docker-compose.yml b/ansible/roles/home-assistant/files/docker-compose.yml index 39d6986..3eb2038 100644 --- a/ansible/roles/home-assistant/files/docker-compose.yml +++ b/ansible/roles/home-assistant/files/docker-compose.yml @@ -11,6 +11,8 @@ services: restart: unless-stopped depends_on: - influxdb + extra_hosts: + - host.docker.internal:172.17.0.1 labels: - traefik.enable=true - traefik.http.routers.homeassistant.rule=Host(`homeassistant.jakehoward.tech`) @@ -22,8 +24,11 @@ services: restart: unless-stopped volumes: - ./influxdb:/var/lib/influxdb + ports: + - 127.0.0.1:48086:8086 environment: - INFLUXDB_DB=home_assistant + - INFLUXDB_HTTP_AUTH_ENABLED= esphome: image: esphome/esphome:latest