Search by

mammatus / healthz-vhost

WyriHaximus

⚕️ Basic health check vhost

Package info

github.com/MammatusPHP/healthz-vhost

Language:Makefile

pkg:composer/mammatus/healthz-vhost

Statistics

Installs: 48 971

Dependents: 2

Suggesters: 0

Stars: 0

Open Issues: 2

0.2.0 2026-10-04 15:44 UTC

README

Continuous Integration Latest Stable Version Total Downloads Type Coverage License

Ready-made Vhost configuration, HTTP handlers, and Kubernetes-style probes for a dedicated healthz virtual host. Install it in a MammatusPHP application that uses mammatus/http-server; the server Composer plugin discovers this package (via extra.mammatus.http.server.has-vhosts) and wires routes, Helm probe paths, and static file serving from public/.

The vhost listens on port 9666 and registers the Mammatus group healthz (Type::Daemon).

Install

To install via Composer, use the command below. Composer picks the latest compatible version and applies a ^ constraint.

composer require mammatus/healthz-vhost

Your application also needs mammatus/http-server (or another stack that consumes the same attributes and Vhost contract). This package does not start an HTTP server by itself.

Routes

All handlers belong to vhost healthz (Vhost attribute). Each exposes a static handle() method marked @api so static analysis treats it as an entrypoint for routing.

HTTP method Path Handler Purpose
GET / IndexHandler Redirects to /index.html
GET /healthz HealthzHandler JSON health payload
GET /probe/liveness LivenessProbeHandler Liveness probe (ProbeType::Liveness)
GET /probe/readiness ReadinessProbeHandler Readiness probe
GET /probe/startup StartUpProbeHandler Startup probe

Successful health and probe handlers respond with 200, Content-Type: application/json, and body {"result":"healthy"}.

More attribute reference: mammatus/http-server-attributes.

License

The MIT License (MIT)

Copyright (c) 2026 Cees-Jan Kiewiet

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.