Compare commits

...

7 Commits

Author SHA1 Message Date
Vojtěch Fošnár
e2bddbf64e
Merge 2ba9337342 into 243726b03c 2024-09-29 14:08:20 +00:00
Louis Lam
243726b03c Update to 1.23.14 2024-09-29 21:46:19 +08:00
Vojtěch Fošnár
2ba9337342 Apply suggestions for docker compose healthcheck
Co-authored-by: Frank Elsinga <frank@elsinga.de>
2024-01-20 03:39:05 +08:00
Vojtěch Fošnár
0b0f081a13 treat the starting state of a docker container as DOWN 2024-01-20 03:39:05 +08:00
Vojtěch Fošnár
0b478404cf make DOWN the default fallback for docker container healthcheck 2024-01-20 03:39:05 +08:00
Vojtěch Fošnár
7f5dfcc051 fix #3767 by @nougad - treat empty healthcheck reported by podman as up 2024-01-20 03:39:05 +08:00
Vojtěch Fošnár
d73684115a fix #4369 - treat unhealthy docker container as down 2024-01-20 03:39:05 +08:00
2 changed files with 8 additions and 6 deletions

View File

@ -1,6 +1,6 @@
{
"name": "uptime-kuma",
"version": "1.23.13",
"version": "1.23.14",
"license": "MIT",
"repository": {
"type": "git",
@ -42,7 +42,7 @@
"build-docker-nightly-amd64": "docker buildx build -f docker/dockerfile --platform linux/amd64 -t louislam/uptime-kuma:nightly-amd64 --target nightly . --push --progress plain",
"build-docker-pr-test": "docker buildx build -f docker/dockerfile --platform linux/amd64,linux/arm64 -t louislam/uptime-kuma:pr-test --target pr-test . --push",
"upload-artifacts": "docker buildx build -f docker/dockerfile --platform linux/amd64 -t louislam/uptime-kuma:upload-artifact --build-arg VERSION --build-arg GITHUB_TOKEN --target upload-artifact . --progress plain",
"setup": "git checkout 1.23.13 && npm ci --production && npm run download-dist",
"setup": "git checkout 1.23.14 && npm ci --production && npm run download-dist",
"download-dist": "node extra/download-dist.js",
"mark-as-nightly": "node extra/mark-as-nightly.js",
"reset-password": "node extra/reset-password.js",

View File

@ -774,12 +774,14 @@ class Monitor extends BeanModel {
let res = await axios.request(options);
if (res.data.State.Running) {
if (res.data.State.Health && res.data.State.Health.Status !== "healthy") {
bean.status = PENDING;
if (res.data.State.Health) {
// 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 = UP;
bean.msg = res.data.State.Health ? res.data.State.Health.Status : res.data.State.Status;
bean.status = DOWN;
bean.msg = res.data.State.Status;
}
} else {
throw Error("Container State is " + res.data.State.Status);