Add healthcheck before deploy

This commit is contained in:
David Heinemeier Hansson
2023-02-18 16:22:08 +01:00
parent 2f80b300f0
commit 933ece35ab
11 changed files with 175 additions and 6 deletions

View File

@@ -59,7 +59,7 @@ class Mrsk::Configuration::Role
if running_traefik?
{
"traefik.http.routers.#{config.service}.rule" => "'PathPrefix(`/`)'",
"traefik.http.services.#{config.service}.loadbalancer.healthcheck.path" => "/up",
"traefik.http.services.#{config.service}.loadbalancer.healthcheck.path" => config.healthcheck["path"],
"traefik.http.services.#{config.service}.loadbalancer.healthcheck.interval" => "1s",
"traefik.http.middlewares.#{config.service}.retry.attempts" => "3",
"traefik.http.middlewares.#{config.service}.retry.initialinterval" => "500ms"