diff --git a/CHANGELOG.md b/CHANGELOG.md index a459ce47a61..fd549e9a64f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -36,6 +36,7 @@ Docs: https://docs.openclaw.ai ### Fixes +- Docker/Image health checks: add Dockerfile `HEALTHCHECK` that probes gateway `GET /healthz` so container runtimes can mark unhealthy instances without requiring auth credentials in the probe command. (#11478) Thanks @U-C4N and @vincentkoc. - Android/Nodes reliability: reject `facing=both` when `deviceId` is set to avoid mislabeled duplicate captures, allow notification `open`/`reply` on non-clearable entries while still gating dismiss, trigger listener rebind before notification actions, and scale invoke-result ack timeout to invoke budget for large clip payloads. (#28260) Thanks @obviyus. - Windows/Plugin install: avoid `spawn EINVAL` on Windows npm/npx invocations by resolving to `node` + npm CLI scripts instead of spawning `.cmd` directly. Landed from contributor PR #31147 by @codertony. Thanks @codertony. - LINE/Voice transcription: classify M4A voice media as `audio/mp4` (not `video/mp4`) by checking the MPEG-4 `ftyp` major brand (`M4A ` / `M4B `), restoring voice transcription for LINE voice messages. Landed from contributor PR #31151 by @scoootscooob. Thanks @scoootscooob. diff --git a/Dockerfile b/Dockerfile index 7e2baae51ab..8753631a7cf 100644 --- a/Dockerfile +++ b/Dockerfile @@ -96,4 +96,6 @@ USER node # - GET /healthz (liveness) and GET /readyz (readiness) # - aliases: /health and /ready # For external access from host/ingress, override bind to "lan" and set auth. +HEALTHCHECK --interval=3m --timeout=10s --start-period=15s --retries=3 \ + CMD node -e "fetch('http://127.0.0.1:18789/healthz').then((r)=>process.exit(r.ok?0:1)).catch(()=>process.exit(1))" CMD ["node", "openclaw.mjs", "gateway", "--allow-unconfigured"] diff --git a/docs/install/docker.md b/docs/install/docker.md index aeedccc5bc7..6bab52cfc4e 100644 --- a/docs/install/docker.md +++ b/docs/install/docker.md @@ -405,6 +405,12 @@ curl -fsS http://127.0.0.1:18789/readyz Aliases: `/health` and `/ready`. +The Docker image includes a built-in `HEALTHCHECK` that pings `/healthz` in the +background. In plain terms: Docker keeps checking if OpenClaw is still +responsive. If checks keep failing, Docker marks the container as `unhealthy`, +and orchestration systems (Docker Compose restart policy, Swarm, Kubernetes, +etc.) can automatically restart or replace it. + Authenticated deep health snapshot (gateway + channels): ```bash