Refactor authentik setup and enable it on more services

This commit is contained in:
Marko Korhonen 2022-11-15 22:06:06 +02:00
parent c99a2279e1
commit 8c1a1dbdc8
Signed by: FunctionalHacker
GPG key ID: A7F78BCB859CD890
4 changed files with 121 additions and 25 deletions

View file

@ -1,5 +1,3 @@
[services]
[services.home-assistant]
container_name = "home-assistant"
image = "homeassistant/home-assistant"
@ -10,7 +8,7 @@ volumes = [
"/etc/localtime:/etc/localtime:ro",
]
restart = "unless-stopped"
networks = ["homeautomation", "postgres", "proxy"]
networks = ["homeautomation", "postgres", "proxy", "authentik"]
ports = ["8123:8123", "8300:8300"]
extra_hosts = ["host.docker.internal:host-gateway"]
depends_on = ["mosquitto"]
@ -21,7 +19,7 @@ labels = [
"traefik.http.routers.home-assistant-redirect.rule=Host(`home.korhonen.cc`)",
"traefik.http.routers.home-assistant-redirect.middlewares=http2https@file",
"traefik.http.routers.home-assistant.entrypoints=https",
"traefik.http.routers.home-assistant.middlewares=secHeaders@file,compress@file",
"traefik.http.routers.home-assistant.middlewares=secHeaders@file,compress@file,authentik@file",
"traefik.http.routers.home-assistant.rule=Host(`home.korhonen.cc`)",
"traefik.http.routers.home-assistant.service=home-assistant",
"traefik.http.services.home-assistant.loadbalancer.server.port=8123",
@ -68,3 +66,6 @@ external = true
[networks.proxy]
external = true
[networks.authentik]
external = true