Migrate home assistant container to hypervised
This commit is contained in:
parent
1a134aa687
commit
cf1231e46a
4 changed files with 27 additions and 26 deletions
14
config/dynamic_conf.yaml
Normal file
14
config/dynamic_conf.yaml
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
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/"
|
|
@ -36,6 +36,8 @@ providers:
|
||||||
docker:
|
docker:
|
||||||
endpoint: "unix:///var/run/docker.sock"
|
endpoint: "unix:///var/run/docker.sock"
|
||||||
exposedByDefault: false
|
exposedByDefault: false
|
||||||
|
http:
|
||||||
|
endpoint: "http://http_provider/dynamic_conf.yaml"
|
||||||
|
|
||||||
certificatesResolvers:
|
certificatesResolvers:
|
||||||
sslResolver:
|
sslResolver:
|
||||||
|
|
|
@ -8,6 +8,7 @@ services:
|
||||||
security_opt:
|
security_opt:
|
||||||
- no-new-privileges:true
|
- no-new-privileges:true
|
||||||
networks:
|
networks:
|
||||||
|
- providers
|
||||||
- proxy
|
- proxy
|
||||||
ports:
|
ports:
|
||||||
- 80:80
|
- 80:80
|
||||||
|
@ -104,8 +105,18 @@ services:
|
||||||
- "traefik.http.routers.grafana-secure.service=grafana"
|
- "traefik.http.routers.grafana-secure.service=grafana"
|
||||||
- "traefik.http.services.grafana.loadbalancer.server.port=3000"
|
- "traefik.http.services.grafana.loadbalancer.server.port=3000"
|
||||||
- "traefik.docker.network=proxy"
|
- "traefik.docker.network=proxy"
|
||||||
|
http_provider:
|
||||||
|
image: httpd:latest
|
||||||
|
restart: unless-stopped
|
||||||
|
container_name: http_provider
|
||||||
|
networks:
|
||||||
|
- internal
|
||||||
|
- providers
|
||||||
|
volumes:
|
||||||
|
- ./config/dynamic_conf.yaml:/usr/local/apache2/htdocs/dynamic_conf.yaml
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
|
providers:
|
||||||
internal:
|
internal:
|
||||||
proxy:
|
proxy:
|
||||||
external: true
|
external: true
|
||||||
|
|
|
@ -1,26 +0,0 @@
|
||||||
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:
|
|
Loading…
Reference in a new issue