mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-10-01 01:25:45 -04:00
Apply suggestions for docker compose healthcheck
Co-authored-by: Frank Elsinga <frank@elsinga.de>
This commit is contained in:
parent
0b0f081a13
commit
2ba9337342
@ -771,13 +771,10 @@ class Monitor extends BeanModel {
|
|||||||
|
|
||||||
if (res.data.State.Running) {
|
if (res.data.State.Running) {
|
||||||
if (res.data.State.Health) {
|
if (res.data.State.Health) {
|
||||||
if ([ "", "healthy" ].includes(res.data.State.Health.Status)) {
|
// treat empty Status as healthy to support podman: https://github.com/louislam/uptime-kuma/issues/3767
|
||||||
bean.status = UP;
|
const containerIsHealthy = [ "", "healthy" ].includes(res.data.State.Health.Status);
|
||||||
bean.msg = res.data.State.Health.Status;
|
bean.status = containerIsHealthy ? UP : DOWN;
|
||||||
} else {
|
bean.msg = res.data.State.Health.Status;
|
||||||
bean.status = DOWN;
|
|
||||||
bean.msg = res.data.State.Health.Status;
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
bean.status = DOWN;
|
bean.status = DOWN;
|
||||||
bean.msg = res.data.State.Status;
|
bean.msg = res.data.State.Status;
|
||||||
|
Loading…
Reference in New Issue
Block a user