Skip to content

Fix/staging healthchecks - #74

Merged
ademboukabes merged 3 commits into
developfrom
fix/staging-healthchecks
Aug 4, 2026
Merged

Fix/staging healthchecks#74
ademboukabes merged 3 commits into
developfrom
fix/staging-healthchecks

Conversation

@ademboukabes

Copy link
Copy Markdown
Collaborator

Description

This PR prepares the infrastructure for a robust production deployment by introducing deep healthchecks and deterministic startup ordering for Docker Compose.

Key Changes

  • Dynamic /health Endpoint: Replaced static response with a full liveness/readiness probe. The API now runs SELECT 1 on Postgres and PING on Redis, returning HTTP 503 if either fails.
  • Native Docker Healthchecks: Added healthcheck blocks for Postgres, MinIO, Redis, NATS, and the API in docker-compose.staging.yml.
  • Strict Startup (depends_on): Replaced simple dependencies with condition: service_healthy to prevent race conditions (workers wait until NATS and DB are fully ready).
  • AES-256-GCM Fix: Updated encryption_key in .env.example and .env.staging.example with a valid 32-byte base64 string to fix CI test crashes caused by the invalid placeholder.
  • Ops Tweaks: Removed pgadmin from staging and set migrate to restart: "no".

Validation

  • Tested /health endpoint with service isolation
  • All unit and integration tests pass successfully (154/154)

@ademboukabes
ademboukabes merged commit 72bb00d into develop Aug 4, 2026
2 checks passed
@ademboukabes
ademboukabes deleted the fix/staging-healthchecks branch August 4, 2026 13:15
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