Skip to content

Conversation

desarrollonextpro
Copy link

Title
fix(templates): add health checks for Evolution API, Redis, and Postgres in compose config

Changes

  • Add health checks for all services:
    • api (Evolution API): internal HTTP GET on http://127.0.0.1:8080/ (2xx = healthy), with start_period: 60s, retries: 30, timeout: 5s.
    • postgres: pg_isready -h 127.0.0.1 -U $${POSTGRES_USER} -d $${POSTGRES_DB}, with sensible retries/start period.
    • redis: redis-cli ping, with sensible retries/start period.
  • Orchestrate startup via depends_on with condition: service_healthy so api waits for postgres and redis.
  • Fix env interpolation of SERVER_URL to ${SERVICE_URL_EVO} (prevents literal value).

Issues

  • N/A

Testing

  • Brought stack up with Docker Compose v2.x.
  • Verified service health:
    • docker compose ps shows api, postgres, redis as healthy.
    • curl -sS http://127.0.0.1:8080/ returns 200 from Evolution API.
  • Confirmed stable startup (no unhealthy/SIGTERM loop).

Backwards compatibility

  • Non-breaking; only adds observability and a sane startup order.

@Cinzya Cinzya added the ⚙️ Service Issues requesting or PRs adding/fixing service templates. label Sep 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⚙️ Service Issues requesting or PRs adding/fixing service templates.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants