From d5ff00c815fa2b30eb77c613e60c1116d75b8d26 Mon Sep 17 00:00:00 2001 From: Matteo Vitali Date: Wed, 10 Jan 2024 14:39:28 +0100 Subject: [PATCH] Add healthchecks supporto on traefik routing --- bootstrap/runner.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/bootstrap/runner.py b/bootstrap/runner.py index 55aa30b1..0831852e 100644 --- a/bootstrap/runner.py +++ b/bootstrap/runner.py @@ -323,17 +323,20 @@ def register_environment_tfvars(self, *vars, env_slug=None): def collect_tfvars(self): """Collect the base, cluster and environment Terraform variables.""" self.register_environment_tfvars(("registry_server", "registry.gitlab.com")) - backend_service_paths = ["/"] - frontend_service_paths = ["/"] + backend_service_paths = ["/", f"/{self.backend_service_slug}"] + frontend_service_paths = ["/", f"/{self.frontend_service_slug}"] if self.frontend_service_slug: self.register_environment_tfvars( ("frontend_service_paths", frontend_service_paths, "list"), ("frontend_service_port", None, "num"), "frontend_service_slug", ) - backend_service_paths = ["/admin", "/api", "/static"] + ( - ["/media"] if self.media_storage == "local" else [] - ) + backend_service_paths = [ + "/admin", + "/api", + "/static", + f"/{self.backend_service_slug}", + ] + (["/media"] if self.media_storage == "local" else []) if self.backend_service_slug: self.register_environment_tfvars( ("backend_service_paths", backend_service_paths, "list"),