Skip to content

Add healthz endpoints and container healthchecks#1002

Open
pgilad wants to merge 2 commits intoseanmorley15:mainfrom
pgilad:healthz-endpoints-and-healthchecks
Open

Add healthz endpoints and container healthchecks#1002
pgilad wants to merge 2 commits intoseanmorley15:mainfrom
pgilad:healthz-endpoints-and-healthchecks

Conversation

@pgilad
Copy link
Copy Markdown

@pgilad pgilad commented Feb 9, 2026

Summary

This PR adds lightweight health endpoints and container healthchecks for both services so Docker/Compose can reliably detect service health and gate startup order.

Changes

  • Added backend health endpoint:
    • GET /healthz returns 200 OK with ok.
  • Added frontend health endpoint:
    • GET /healthz returns 200 OK with ok.
  • Added backend healthcheck script:
    • backend/server/healthcheck.py
    • Uses Python stdlib HTTP client (no curl/wget dependency).
  • Added frontend healthcheck script:
    • frontend/healthcheck.mjs
    • Uses Node fetch (no extra packages).
  • Added image-level Docker HEALTHCHECK directives:
    • backend/Dockerfile
    • frontend/Dockerfile
  • Added Compose-level healthchecks and startup gating:
    • docker-compose.yml
    • docker-compose.dev.yml
    • docker-compose-traefik.yaml
    • web now depends on server with condition: service_healthy.

Why

  • Improves container health visibility (healthy/unhealthy).
  • Avoids shipping extra network tools in runtime images.
  • Prevents frontend from starting before backend is actually healthy in Compose examples.

Validation

  • Python syntax checks passed for new/updated backend files.
  • Node syntax check passed for frontend/healthcheck.mjs.
  • Verified new route and healthcheck wiring is present across Dockerfiles and compose files.

Notes

  • Existing prebuilt images must include these new files; otherwise healthchecks that reference them will fail until images are rebuilt/pulled with this change.

@pgilad pgilad requested a review from seanmorley15 as a code owner February 9, 2026 21:37
@vercel
Copy link
Copy Markdown

vercel bot commented Feb 9, 2026

@pgilad is attempting to deploy a commit to the Sean Morley's Projects Team on Vercel.

A member of the Team first needs to authorize it.

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.

1 participant