fix(compose): repair crm healthcheck and inject VITE_* envs into frontend runtime#11
Merged
DavidsonGomes merged 1 commit intomainfrom Apr 15, 2026
Conversation
…tend runtime The evo-crm container healthcheck ran curl -f against /auth/sign_in, a legacy Chatwoot endpoint that no longer exists, so the CRM was perpetually marked unhealthy. Any dependent container with a service_healthy condition (notably evo-frontend) then refused to start, freezing make start in a "Waiting" loop. Repointed the healthcheck at /health/live, which the Rails app already exposes and returns 200. The evo-frontend Dockerfile builds the Vite bundle with VITE_*_PLACEHOLDER literals and replaces them at container start via docker-entrypoint.sh using sed on the envs at runtime. The compose file only passed those values as build args, so the runtime envs were empty, the sed was a no-op, and the bundle shipped with raw VITE_AUTH_API_URL_PLACEHOLDER strings. Axios then treated the baseURL as a relative path, POSTs to /auth/sign_in hit the nginx static SPA, and login returned HTTP 405. Added an environment: block that mirrors the build args and also includes VITE_WS_URL (which the actionCableService reads and had no build-time default). Bumps submodule pointers for the four repos touched in this change set.
There was a problem hiding this comment.
Hi @gomessguii! 👋
Your private repo does not have access to Sourcery.
Please upgrade to continue using Sourcery ✨
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two dev-environment fixes in
docker-compose.yml, plus submodule pointer bumps for the four community repos that contain the rest of the work.evo-crmhealthcheckThe container healthcheck ran
curl -f http://localhost:3000/auth/sign_in, a legacy Chatwoot endpoint that no longer exists. It always returned 4xx, the container was perpetuallyunhealthy, andevo-frontend(which hasdepends_on: evo-crm: condition: service_healthy) refused to start, freezingmake startin aWaitingloop.Repointed the healthcheck at
/health/live, which the Rails app already exposes and returns 200.evo-frontendruntime envsThe frontend Dockerfile builds the Vite bundle with
VITE_*_PLACEHOLDERliterals and replaces them at container start viadocker-entrypoint.sh(sed). The compose file was passingVITE_*only as build args, so the runtime envs were empty, the sed was a no-op, and the bundle shipped with rawVITE_AUTH_API_URL_PLACEHOLDERstrings. Axios then interpreted the bad baseURL as a relative path, login POSTs hit the static SPA, and login returned HTTP 405 Method Not Allowed.Added an
environment:block toevo-frontendmirroring the build args, plusVITE_WS_URL(whichactionCableServicereads and was previously not declared at all).Submodule bumps
Bumps pointers for:
evo-ai-crm-community→ PR #2evo-auth-service-community→ PR #2evo-ai-processor-community→ PR #1evo-ai-frontend-community→ PR #6mainof those repos.Issue: EVO-937
Test plan
make startboots the entire stack without freezing inWaitingevo-crmcontainer reacheshealthystatus within the start_periodhttp://localhost:5173— POST/auth/sign_inshould hit the auth service and return 200, no longer 405docker exec evo-crm-community-evo-frontend-1 grep -o "VITE_[A-Z_]*_PLACEHOLDER" /usr/share/nginx/html/assets/*.jsreturns nothing (placeholders all substituted)