Add /ping as a healthcheck
This commit is contained in:
parent
7490f07671
commit
269e88b827
|
@ -1,4 +1,4 @@
|
||||||
FROM danielberteaud/alma:9.24.3-1
|
FROM danielberteaud/alma:9.24.4-1
|
||||||
MAINTAINER Daniel Berteaud <dbd@ehtrace.com>
|
MAINTAINER Daniel Berteaud <dbd@ehtrace.com>
|
||||||
|
|
||||||
ARG LLNG_VERSION=2.18.2
|
ARG LLNG_VERSION=2.18.2
|
||||||
|
|
|
@ -6,13 +6,6 @@ job "lemonldap-ng" {
|
||||||
priority = 60
|
priority = 60
|
||||||
|
|
||||||
|
|
||||||
constraint {
|
|
||||||
operator = "distinct_hosts"
|
|
||||||
value = "true"
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
group "lemonldap-ng" {
|
group "lemonldap-ng" {
|
||||||
|
|
||||||
count = 1
|
count = 1
|
||||||
|
@ -76,6 +69,18 @@ job "lemonldap-ng" {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
check {
|
||||||
|
type = "http"
|
||||||
|
path = "/ping"
|
||||||
|
expose = true
|
||||||
|
interval = "30s"
|
||||||
|
timeout = "5s"
|
||||||
|
check_restart {
|
||||||
|
limit = 6
|
||||||
|
grace = "5m"
|
||||||
|
}
|
||||||
|
}
|
||||||
tags = [
|
tags = [
|
||||||
|
|
||||||
"traefik.http.routers.lemonldap-ng-portal.rule=Host(`sso.example.org`) && !PathRegexp(`^/index\\.psgi/(config|sessions)`)",
|
"traefik.http.routers.lemonldap-ng-portal.rule=Host(`sso.example.org`) && !PathRegexp(`^/index\\.psgi/(config|sessions)`)",
|
||||||
|
@ -106,7 +111,7 @@ job "lemonldap-ng" {
|
||||||
user = 1053
|
user = 1053
|
||||||
|
|
||||||
config {
|
config {
|
||||||
image = "danielberteaud/wait-for:24.3-1"
|
image = "danielberteaud/wait-for:24.4-1"
|
||||||
readonly_rootfs = true
|
readonly_rootfs = true
|
||||||
pids_limit = 20
|
pids_limit = 20
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,9 +21,22 @@ job "[[ .instance ]]" {
|
||||||
[[ template "common/service_meta" $c ]]
|
[[ template "common/service_meta" $c ]]
|
||||||
[[ template "common/connect" $c ]]
|
[[ template "common/connect" $c ]]
|
||||||
|
|
||||||
|
check {
|
||||||
|
type = "http"
|
||||||
|
path = "/ping"
|
||||||
|
expose = true
|
||||||
|
interval = "[[ $c.consul.check.interval ]]"
|
||||||
|
timeout = "[[ $c.consul.check.timeout ]]"
|
||||||
|
check_restart {
|
||||||
|
limit = 6
|
||||||
|
grace = "5m"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
[[- $p := merge .llng.portal . ]]
|
[[- $p := merge .llng.portal . ]]
|
||||||
[[- $m := merge .llng.manager . ]]
|
[[- $m := merge .llng.manager . ]]
|
||||||
[[- $a := merge .llng.api .llng.portal . ]]
|
[[- $a := merge .llng.api .llng.portal . ]]
|
||||||
|
|
||||||
tags = [
|
tags = [
|
||||||
|
|
||||||
"[[ $p.traefik.instance ]].http.routers.[[ .instance ]]-portal[[ .consul.suffix ]].rule=Host(`[[ (urlParse $p.public_url).Hostname ]]`) && !PathRegexp(`^/index\\.psgi/(config|sessions)`)",
|
"[[ $p.traefik.instance ]].http.routers.[[ .instance ]]-portal[[ .consul.suffix ]].rule=Host(`[[ (urlParse $p.public_url).Hostname ]]`) && !PathRegexp(`^/index\\.psgi/(config|sessions)`)",
|
||||||
|
|
Loading…
Reference in New Issue