Skip to content

fix(frontend): copy Next.js export from out/ not dist/ in Docker build#67

Merged
Kingvic300 merged 1 commit into
mainfrom
fix/40-frontend-docker-out
Jun 7, 2026
Merged

fix(frontend): copy Next.js export from out/ not dist/ in Docker build#67
Kingvic300 merged 1 commit into
mainfrom
fix/40-frontend-docker-out

Conversation

@Kingvic300

@Kingvic300 Kingvic300 commented Jun 7, 2026

Copy link
Copy Markdown
Owner

Summary

The frontend is Next.js with output: 'export' (next.config.ts), which emits the static site to out/. The Docker build copied /app/dist — a path next build never produces — so the nginx image was built with an empty/incorrect web root.

Changes

This matches the root package.json build script, which already references frontend/out/*.

Testing

  • Path-only change; verified against next.config.ts (output: 'export').

Closes #40

Summary by CodeRabbit

  • Chores
    • Updated Docker build configuration to properly align with Next.js static export output handling for improved deployment consistency.

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
@vercel

vercel Bot commented Jun 7, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
txio Ready Ready Preview, Comment Jun 7, 2026 11:44am

@coderabbitai

coderabbitai Bot commented Jun 7, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

Pull request was closed or merged during review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 8162c159-32a4-452a-a16c-11594d8289b0

📥 Commits

Reviewing files that changed from the base of the PR and between 74b9e4b and b4a9f0c.

📒 Files selected for processing (1)
  • frontend/Dockerfile

📝 Walkthrough

Walkthrough

The Dockerfile's static content source is corrected from a non-existent dist directory to the actual Next.js export output directory out. A comment clarifies the path for future maintainers.

Changes

Next.js Static Export Path in Dockerfile

Layer / File(s) Summary
Dockerfile output path correction
frontend/Dockerfile
The COPY instruction now targets /app/out (the Next.js export output directory) instead of /app/dist, with an added comment documenting the correct path.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

A rabbit hops through Docker files with glee,
/out not /dist is where exports be! 🐰📦
The build will now work, fast and clean,
Static exports serve the frontend scene.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately and clearly describes the main change: fixing the Docker build to copy Next.js export from the correct 'out/' directory instead of the non-existent 'dist/' directory.
Linked Issues check ✅ Passed The pull request fulfills the primary objective of issue #40: correcting the Dockerfile to copy from /app/out into the nginx webroot, aligning with Next.js's 'export' output configuration.
Out of Scope Changes check ✅ Passed All changes are directly related to resolving issue #40; the Dockerfile modification and comment addition are appropriately scoped to fixing the Docker build path.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/40-frontend-docker-out

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

@Kingvic300 Kingvic300 merged commit d73d242 into main Jun 7, 2026
2 of 5 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.

[High] Frontend Dockerfile copies dist/ but Next.js exports to out/

1 participant