Skip to content

Feature request: Add /health HTTP endpoint for health-checks / readiness #48

@boly38

Description

@boly38

Motivation

When deploying MongoDB-PHP-GUI in containerized or orchestrated environments (e.g. Kubernetes, Docker Swarm, PaaS platforms like Coolify), it is common to require a lightweight HTTP endpoint that returns a simple “OK” status for readiness or liveness probes.
Currently MongoDB-PHP-GUI does not expose such an endpoint out of the box.

Proposal

Add a new route, e.g. /health or /ready, which returns:

HTTP/1.1 200 OK
Content-Type: application/json

{ "status": "ok" }

This endpoint would:

  • Not require authentication.
  • Be extremely lightweight (no heavy database or index operations).
  • Allow external systems (load-balancers, PaaS, container orchestrators) to mark the service as healthy or not.

Benefits

  • Simplifies deployment in autoscaled environments.
  • Enables integration with health-checks of PaaS platforms (e.g., Coolify).
  • Improves reliability: orchestrator can restart or remove instances that don’t respond.
  • Minimal implementation effort and overhead.

Implementation ideas

  • Add a simple route in routes.php or index.php.
  • Return 200 if the application is running, 500 if critical subsystems fail (optional).
  • Document the endpoint in the README under “Health/Readiness check”.

Thank you for considering this enhancement!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions