Skip to content

feat(docker): add healthcheck to hub docker-compose example - #2001

Merged
henrygd merged 2 commits into
henrygd:mainfrom
Iriome-Santana:fix/add-healthcheck-to-hub-compose
May 20, 2026
Merged

henrygd merged 2 commits into
henrygd:mainfrom
Iriome-Santana:fix/add-healthcheck-to-hub-compose

Conversation

@Iriome-Santana

Copy link
Copy Markdown
Contributor

What

Adds a healthcheck directive to supplemental/docker/hub/docker-compose.yml.

Why

The hub image is distroless — no shell, no wget, no curl — so the typical healthcheck patterns fail silently. The binary already exposes a health subcommand that performs an HTTP self-check, making it a natural fit for HEALTHCHECK.

Without this, containers running the distroless hub image show as "running" indefinitely even when wedged, with no orchestrator-level liveness signal and no automatic restart policy trigger.

Verification

Tested on henrygd/beszel:0.18.7:

$ docker exec beszel /beszel health --url http://127.0.0.1:8090
ok
$ echo $?
0

Closes #1963

The hub image is distroless so wget/curl are not available.
The binary exposes a health subcommand that performs an HTTP
self-check, making it suitable for use as a Docker HEALTHCHECK.

Verified working on henrygd/beszel:0.18.7:
  docker exec beszel /beszel health --url http://127.0.0.1:8090
  exit code 0
@Iriome-Santana
Iriome-Santana requested a review from henrygd as a code owner May 13, 2026 22:04
@Iriome-Santana

Copy link
Copy Markdown
Contributor Author

Also added the healthcheck to supplemental/docker/same-system/docker-compose.yml since it includes the hub service as well and has the same issue

@henrygd
henrygd merged commit 0e65a23 into henrygd:main May 20, 2026
@henrygd

henrygd commented May 20, 2026

Copy link
Copy Markdown
Owner

Thanks!

xiaoran7 pushed a commit to xiaoran7/beszel that referenced this pull request Oct 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Docs]: Add HEALTHCHECK example using built-in beszel health to compose

2 participants