simple-web-healthcheck

Crates.iosimple-web-healthcheck
lib.rssimple-web-healthcheck
version0.3.0
created_at2025-05-18 13:43:54.728754+00
updated_at2025-08-24 14:47:03.176131+00
descriptionA simple healthcheck for web containers
homepage
repositoryhttps://github.com/Data5tream/simple-web-healthcheck-rs
max_upload_size
id1678653
size26,790
Simon Barth (Data5tream)

documentation

README

simple-web-healthcheck

Crates.io Version Crates.io Total Downloads GitHub Release GitHub Actions Workflow Status GitHub License

Simple healthcheck for web app containers

Usage

The healthcheck will report as healthy if the HTTP request is successful and the status of the HTTP requests is not in the range of 400-599. Provide the healthcheck URL as the first argument to the binary.

Check out the web-test-container Dockerfile for a usage example.

The simple-web-healthcheck binary currently has a size of around 1.6 MB.

Dockerfile

Add as a step to your multistage container build:

# Build healthcheck
FROM rust:1.87-bookworm AS healthcheck-builder

RUN cargo install simple-web-healthcheck

# Rest of your build...
    
FROM gcr.io/distroless/cc-debian12

COPY --from=healthcheck-builder /usr/local/cargo/bin/simple-web-healthcheck /healthcheck

# Copy your app here

HEALTHCHECK --interval=10s --timeout=1s CMD ["/healthcheck", "http://127.0.0.1:8080"]
Commit count: 9

cargo fmt