Description
Add /health (liveness) and /health/ready (readiness) endpoints that report the status of all dependencies: database connectivity, Redis connectivity, Stellar RPC reachability, IPFS node status, and disk space. These are critical for Kubernetes/container orchestration and load balancer health checks.
Definition of Done
Acceptance Criteria
curl /health returns 200 with {"status": "ok"}
curl /health/ready returns 200 when all deps are up, 503 when any dep is down
- Response body shows per-dependency status for debugging
- Kubernetes/docker-compose uses these for health checks
Files to Modify
- New file:
backend/src/routes/health.ts — health check routes
backend/src/index.ts — register health routes
backend/src/config/redis.ts — add ping method
backend/Dockerfile — add HEALTHCHECK instruction
frontend/Dockerfile — add HEALTHCHECK instruction
docker-compose.yml — add healthcheck configs
backend/src/docs/openapi.ts — document health endpoints
Description
Add
/health(liveness) and/health/ready(readiness) endpoints that report the status of all dependencies: database connectivity, Redis connectivity, Stellar RPC reachability, IPFS node status, and disk space. These are critical for Kubernetes/container orchestration and load balancer health checks.Definition of Done
GET /healthreturns 200 if process is alive (liveness probe)GET /health/readyreturns 200 only if all dependencies are healthy (readiness probe)Acceptance Criteria
curl /healthreturns 200 with{"status": "ok"}curl /health/readyreturns 200 when all deps are up, 503 when any dep is downFiles to Modify
backend/src/routes/health.ts— health check routesbackend/src/index.ts— register health routesbackend/src/config/redis.ts— add ping methodbackend/Dockerfile— add HEALTHCHECK instructionfrontend/Dockerfile— add HEALTHCHECK instructiondocker-compose.yml— add healthcheck configsbackend/src/docs/openapi.ts— document health endpoints