Conversation
next.config.ts turns NEXT_PUBLIC_API_V2_URL into a server-side rewrite that is baked at build time, so a runtime override cannot fix it. The image shipped http://localhost:5555/api/v2, which inside the web container resolves to the web container itself where nothing listens, so every /api/v2/* request proxied by the web app failed. The API v2 service is reachable as calcom-api on the shared compose network.
|
Note Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported. |
|
Warning Review limit reachedNext included review available in 13 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_0d6b1043-d178-41f7-9d3e-337ac47f1ace) |
next.config.ts turns NEXT_PUBLIC_API_V2_URL into a server-side rewrite that is baked at build time, so a runtime environment override cannot correct it. The published image shipped http://localhost:5555/api/v2 - inside the web container that resolves to the web container itself, where nothing listens on 5555, so every /api/v2/* request proxied through the web app failed. The API v2 service is published as calcom-api on the shared compose network (API_PORT defaults to 5555 per apps/api/v2/src/config/app.ts). Also carries the example-app next 15.5.24 bump that clears the last two critical Dependabot alerts.
Note
Low Risk
CI build-arg-only change that corrects Docker networking for API v2 rewrites; no application logic changes in this diff.
Overview
Fixes broken
/api/v2traffic in the production Docker image by changing theNEXT_PUBLIC_API_V2_URLbuild arg indeploy-docker.ymlfromhttp://localhost:5555/api/v2tohttp://calcom-api:5555/api/v2.Because
next.config.tsembeds that value in a build-time server rewrite, runtime env vars cannot override it. Inside the web container,localhost:5555pointed at the web process itself (nothing listening there), so proxied API v2 calls failed. The new host matches the API v2 service name on the compose network.Inline comments document this behavior and note that the image must be rebuilt if the service is renamed.
Reviewed by Cursor Bugbot for commit 886edf4. Configure here.