From 920ef55546d68d9831e4210e8733ee4a6b772aec Mon Sep 17 00:00:00 2001 From: florian Date: Wed, 22 Mar 2023 13:23:54 +0100 Subject: [PATCH] Migrate to docker home assistant --- config/dynamic_conf.yaml | 15 +-------------- home_assistant/docker-compose.yml | 26 ++++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 14 deletions(-) create mode 100644 home_assistant/docker-compose.yml diff --git a/config/dynamic_conf.yaml b/config/dynamic_conf.yaml index 9f679e0..7b0134d 100644 --- a/config/dynamic_conf.yaml +++ b/config/dynamic_conf.yaml @@ -1,14 +1 @@ -http: - routers: - homeAssistant-secure: - entryPoints: - - https - rule: Host(`domo.mrdev023.fr`) - tls: - certResolver: sslResolver - service: homeAssistant - services: - homeAssistant: - loadBalancer: - servers: - - url: "http://172.17.0.1:8123/" +http: {} diff --git a/home_assistant/docker-compose.yml b/home_assistant/docker-compose.yml new file mode 100644 index 0000000..86dc9e0 --- /dev/null +++ b/home_assistant/docker-compose.yml @@ -0,0 +1,26 @@ +version: '3' + +services: + home_assistant: + image: homeassistant/home-assistant + restart: always + container_name: home_assistant + environment: + - TZ=Europe/Paris + volumes: + - home_assistant_config:/config + - /etc/localtime:/etc/localtime:ro + network_mode: host + expose: + - 8123 + labels: + - "traefik.enable=true" + - "traefik.http.routers.homeassistant-secure.entrypoints=https"ΓΈ + - "traefik.http.routers.homeassistant-secure.rule=Host(`domo.mrdev023.fr`)" + - "traefik.http.routers.homeassistant-secure.tls=true" + - "traefik.http.routers.homeassistant-secure.tls.certresolver=sslResolver" + # - "traefik.http.routers.homeassistant-secure.service=homeassistant" + - "traefik.http.services.homeassistant.loadbalancer.server.port=8123" + +volumes: + home_assistant_config: