Skip to content

fix(docker): point the baked API v2 rewrite at the calcom-api service - #70

Merged
JOY (JOY) merged 1 commit into
mainfrom
dev
Sep 12, 2026
Merged

JOY (JOY) merged 1 commit into
mainfrom
dev

Conversation

@JOY

@JOY JOY (JOY) commented Sep 12, 2026

Copy link
Copy Markdown

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/v2 traffic in the production Docker image by changing the NEXT_PUBLIC_API_V2_URL build arg in deploy-docker.yml from http://localhost:5555/api/v2 to http://calcom-api:5555/api/v2.

Because next.config.ts embeds that value in a build-time server rewrite, runtime env vars cannot override it. Inside the web container, localhost:5555 pointed 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.

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.
@gemini-code-assist

Copy link
Copy Markdown

Note

Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported.

@coderabbitai

coderabbitai Bot commented Sep 12, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 13 minutes.

Check out review usage here.

View limit details

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

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 7ab69c86-4e3a-4db5-b9eb-93de1251e6d5

📥 Commits

Reviewing files that changed from the base of the PR and between 5760eb1 and 886edf4.

📒 Files selected for processing (1)
  • .github/workflows/deploy-docker.yml

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@cursor

cursor Bot commented Sep 12, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot 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)

@JOY
JOY (JOY) merged commit 867f650 into main Sep 12, 2026
21 checks passed
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