providers/proxy: add PathPrefix to auto-traefik labels

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>

#2128
This commit is contained in:
Jens Langhammer 2022-01-23 21:55:44 +01:00
parent 08af2fd46b
commit 82cc1d536a
1 changed files with 3 additions and 1 deletions

View File

@ -26,7 +26,9 @@ class ProxyDockerController(DockerController):
traefik_name = f"ak-outpost-{self.outpost.pk.hex}"
labels = super()._get_labels()
labels["traefik.enable"] = "true"
labels[f"traefik.http.routers.{traefik_name}-router.rule"] = f"Host({','.join(hosts)})"
labels[
f"traefik.http.routers.{traefik_name}-router.rule"
] = f"Host({','.join(hosts)}) && PathPrefix('/akprox')"
labels[f"traefik.http.routers.{traefik_name}-router.tls"] = "true"
labels[f"traefik.http.routers.{traefik_name}-router.service"] = f"{traefik_name}-service"
labels[