Skip to content

fix: corrige path do healthcheck do evo-core (404 → /health)#26

Open
rafamarchetti wants to merge 1 commit intoEvolutionAPI:mainfrom
rafamarchetti:patch-1
Open

fix: corrige path do healthcheck do evo-core (404 → /health)#26
rafamarchetti wants to merge 1 commit intoEvolutionAPI:mainfrom
rafamarchetti:patch-1

Conversation

@rafamarchetti
Copy link
Copy Markdown

@rafamarchetti rafamarchetti commented Apr 18, 2026

Problema

O healthcheck do evo-core no docker-compose.yml está configurado para
bater em /api/v1/health, mas esse endpoint retorna HTTP 404.

O endpoint real de health é /health, confirmado inspecionando a resposta
direto no container com wget.

Sintomas

  • docker compose ps mostra o evo-core como (unhealthy) indefinidamente,
    mesmo quando o serviço está totalmente funcional e respondendo.
  • Serviços que dependem do evo-core (ex: evo-frontend) se recusam a
    iniciar por causa da dependência unhealthy.

Verificação

Testes feitos dentro do container:

$ docker compose exec evo-core wget -qO- http://localhost:5555/health
{"success":true,"data":{"components":[...],"service":"evo-ai-core-service","status":"healthy","version":"1.0.0"}}
$ docker compose exec evo-core wget -qO- http://localhost:5555/api/v1/health
wget: server returned error: HTTP/1.1 404 Not Found

Correção

Mudança de uma linha: remover o prefixo /api/v1 da URL do healthcheck.

Plano de teste

Depois de aplicar, o evo-core fica (healthy) em cerca de 30 segundos e
os serviços dependentes (como evo-frontend) conseguem iniciar normalmente.

Ambiente testado

  • Oracle Cloud Free Tier, Ubuntu 22.04 ARM64
  • Docker Compose v2.x
  • Fork com instalação completa em produção

Summary by Sourcery

Bug Fixes:

  • Fix evo-core container healthcheck path so Docker Compose no longer marks the service as unhealthy when it is actually healthy.

O healthcheck estava configurado para /api/v1/health, que retorna HTTP 404. O endpoint correto é /health.

Sem essa correção, o container evo-core fica marcado como "unhealthy" mesmo estando funcional, o que impede que serviços dependentes (como evo-frontend) consigam iniciar.
@sourcery-ai
Copy link
Copy Markdown

sourcery-ai bot commented Apr 18, 2026

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Adjusts the evo-core service healthcheck in docker-compose to use the correct /health endpoint instead of the non-existent /api/v1/health path, so Docker can correctly mark the service as healthy and allow dependent services to start.

Sequence diagram for updated evo-core healthcheck behavior

sequenceDiagram
    actor Operator
    participant DockerCompose
    participant DockerEngine
    participant EvoCore as evo-core_container
    participant HealthEndpoint as evo-core_/health
    participant EvoFrontend as evo-frontend_container

    Operator->>DockerCompose: docker compose up
    DockerCompose->>DockerEngine: Start evo-core with healthcheck

    loop Every_15s_until_healthy_or_retries
        DockerEngine->>EvoCore: Execute healthcheck CMD
        EvoCore->>HealthEndpoint: GET http://localhost:5555/health
        HealthEndpoint-->>EvoCore: 200 OK status healthy
        EvoCore-->>DockerEngine: Healthcheck success
    end

    DockerEngine-->>DockerCompose: evo-core status = healthy
    DockerCompose->>DockerEngine: Start evo-frontend (depends_on.condition=service_healthy)
    DockerEngine-->>EvoFrontend: Container started
Loading

File-Level Changes

Change Details Files
Fix evo-core healthcheck endpoint in Docker Compose to point to the real /health URL.
  • Updated the healthcheck test command to request http://localhost:5555/health instead of the outdated /api/v1/health path
  • Kept existing healthcheck options (wget invocation, interval, timeout, retries) unchanged to preserve previous behavior aside from the URL fix
docker-compose.yml

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link
Copy Markdown

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

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