fix: correct server.js path in Dockerfile CMD for standalone build#3098
fix: correct server.js path in Dockerfile CMD for standalone build#3098octo-patch wants to merge 1 commit intoonlook-dev:mainfrom
Conversation
…ixes onlook-dev#3046) The CMD instruction referenced apps/web/client/server.js, which does not exist after a Next.js standalone build. The correct output path is apps/web/client/.next/standalone/apps/web/client/server.js, matching the start:standalone script in apps/web/client/package.json.
|
Someone is attempting to deploy a commit to the Onlook Team on Vercel. A member of the Team first needs to authorize it. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughUpdated the Dockerfile to reference the correct Next.js server path in the standalone build output directory. The container startup command now points to Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
Fixes #3046
Problem
The Dockerfile
CMDinstruction referencedapps/web/client/server.js, which does not exist after a Next.js standalone build. When running the Docker image, bun throws:Solution
Updated the
CMDpath to match the actual standalone build output location:This matches what the
start:standalonescript inapps/web/client/package.jsonalready uses:The
build:standalonescript copies assets into.next/standalone/apps/web/client/, so the server entry point is always at that path when building from the monorepo root.Testing
The fix aligns the Dockerfile CMD with the existing
start:standalonenpm script, which is the canonical way to start the standalone server.Summary by CodeRabbit