fix(frontend): copy Next.js export from out/ not dist/ in Docker build#67
Conversation
The frontend is Next.js with output: 'export', which writes the static site to ./out. The Dockerfile copied /app/dist (a Vite-era path that no longer exists), producing a broken nginx image. Point COPY at /app/out, matching the root package.json build script that already uses out/. Closes #40
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Caution Review failedPull request was closed or merged during review No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe Dockerfile's static content source is corrected from a non-existent ChangesNext.js Static Export Path in Dockerfile
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)
Comment |
Summary
The frontend is Next.js with
output: 'export'(next.config.ts), which emits the static site toout/. The Docker build copied/app/dist— a pathnext buildnever produces — so the nginx image was built with an empty/incorrect web root.Changes
COPY --from=builder /app/out /usr/share/nginx/htmlin frontend/Dockerfile.This matches the root package.json
buildscript, which already referencesfrontend/out/*.Testing
next.config.ts(output: 'export').Closes #40
Summary by CodeRabbit