Simplify path for health endpoints

This commit is contained in:
Daniel Berteaud 2024-03-26 14:54:52 +01:00
parent 5d46db4a93
commit 4aed1378b2
1 changed files with 2 additions and 2 deletions

View File

@ -27,7 +27,7 @@ job "[[ .instance ]]-services" {
name = "health"
type = "http"
expose = true
path = "[[ if eq "" (urlParse $c.public_url).Path ]]/[[ else ]][[ (urlParse $c.public_url).Path ]][[ end ]]-/healthy"
path = "[[ (urlParse $c.public_url).Path | regexp.Replace "/$" "" ]]/-/healthy"
interval = "20s"
timeout = "8s"
check_restart {
@ -209,7 +209,7 @@ _EOT
name = "health"
type = "http"
expose = true
path = "[[ if eq "" (urlParse $c.public_url).Path ]]/[[ else ]][[ (urlParse $c.public_url).Path ]][[ end ]]-/healthy"
path = "[[ (urlParse $c.public_url).Path | regexp.Replace "/$" "" ]]/-/healthy"
interval = "20s"
timeout = "8s"
check_restart {