Skip to content

fix(compose): repair crm healthcheck and inject VITE_* envs into frontend runtime#11

Merged
DavidsonGomes merged 1 commit intomainfrom
fix/admin-facebook-config-and-channel-tooltips
Apr 15, 2026
Merged

fix(compose): repair crm healthcheck and inject VITE_* envs into frontend runtime#11
DavidsonGomes merged 1 commit intomainfrom
fix/admin-facebook-config-and-channel-tooltips

Conversation

@gomessguii
Copy link
Copy Markdown
Member

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-crm healthcheck

The 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 perpetually unhealthy, and evo-frontend (which has depends_on: evo-crm: condition: service_healthy) 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.

evo-frontend runtime envs

The frontend Dockerfile builds the Vite bundle with VITE_*_PLACEHOLDER literals and replaces them at container start via docker-entrypoint.sh (sed). The compose file was passing VITE_* only 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 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 to evo-frontend mirroring the build args, plus VITE_WS_URL (which actionCableService reads and was previously not declared at all).

Submodule bumps

Bumps pointers for:

  • evo-ai-crm-communityPR #2
  • evo-auth-service-communityPR #2
  • evo-ai-processor-communityPR #1
  • evo-ai-frontend-communityPR #6

⚠️ This PR depends on the four submodule PRs above being merged first, otherwise the bumped submodule pointers reference commits that don't exist on the upstream main of those repos.

Issue: EVO-937

Test plan

  • make start boots the entire stack without freezing in Waiting
  • evo-crm container reaches healthy status within the start_period
  • Login at http://localhost:5173 — POST /auth/sign_in should hit the auth service and return 200, no longer 405
  • docker exec evo-crm-community-evo-frontend-1 grep -o "VITE_[A-Z_]*_PLACEHOLDER" /usr/share/nginx/html/assets/*.js returns nothing (placeholders all substituted)

…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.
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.

Hi @gomessguii! 👋

Your private repo does not have access to Sourcery.

Please upgrade to continue using Sourcery ✨

@DavidsonGomes DavidsonGomes merged commit 270921b into main Apr 15, 2026
0 of 2 checks passed
@DavidsonGomes DavidsonGomes deleted the fix/admin-facebook-config-and-channel-tooltips branch April 15, 2026 13:48
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.

2 participants