From 2ba933734236c2368295cf225b2d703a56ecdda0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vojt=C4=9Bch=20Fo=C5=A1n=C3=A1r?= Date: Thu, 18 Jan 2024 09:45:32 +0100 Subject: [PATCH] Apply suggestions for docker compose healthcheck Co-authored-by: Frank Elsinga --- server/model/monitor.js | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/server/model/monitor.js b/server/model/monitor.js index 5aef8b144..d036e3002 100644 --- a/server/model/monitor.js +++ b/server/model/monitor.js @@ -771,13 +771,10 @@ class Monitor extends BeanModel { if (res.data.State.Running) { if (res.data.State.Health) { - if ([ "", "healthy" ].includes(res.data.State.Health.Status)) { - bean.status = UP; - bean.msg = res.data.State.Health.Status; - } else { - bean.status = DOWN; - bean.msg = res.data.State.Health.Status; - } + // treat empty Status as healthy to support podman: https://github.com/louislam/uptime-kuma/issues/3767 + const containerIsHealthy = [ "", "healthy" ].includes(res.data.State.Health.Status); + bean.status = containerIsHealthy ? UP : DOWN; + bean.msg = res.data.State.Health.Status; } else { bean.status = DOWN; bean.msg = res.data.State.Status;