Skip to content
This repository has been archived by the owner on Dec 4, 2023. It is now read-only.

Commit

Permalink
add traefik PathPrefix to services (#156)
Browse files Browse the repository at this point in the history
  • Loading branch information
sekulicd authored Oct 3, 2023
1 parent 4602edb commit 3780aff
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions app/core/services.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,9 +197,13 @@ def run_container_with_retries(service_object):
if dns:
labels = {
"traefik.enable": "true",
f"traefik.http.routers.{service_id}-http.rule": f"Host(`{service_id}.{dns}`)",
f"traefik.http.routers.{service_id}-http.rule": (
f"PathPrefix(`/`) && Host(`{service_id}.{dns}`)"
),
f"traefik.http.routers.{service_id}-http.entrypoints": "web",
f"traefik.http.routers.{service_id}-https.rule": f"Host(`{service_id}.{dns}`)",
f"traefik.http.routers.{service_id}-https.rule": (
f"PathPrefix(`/`) && Host(`{service_id}.{dns}`)"
),
f"traefik.http.routers.{service_id}-https.entrypoints": "websecure",
f"traefik.http.routers.{service_id}-https.tls.certresolver": "myresolver",
"traefik.http.middlewares.http-to-https.redirectscheme.scheme": "https",
Expand Down

0 comments on commit 3780aff

Please sign in to comment.