Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Next.js (box) - internal server error #551

Open
andriilive opened this issue Sep 21, 2024 · 1 comment
Open

Next.js (box) - internal server error #551

andriilive opened this issue Sep 21, 2024 · 1 comment

Comments

@andriilive
Copy link

andriilive commented Sep 21, 2024

The default next.js box build returns internal server error on a front, build passing with warnings

CleanShot 2024-09-21 at 16 38 33@2x

also, using start script with standalone output is outdated method, should be updated to something like below instead:

#copy the public folder to dist folder
cp -r public .next
cp -r .next/static ./next/standalone

#start the server
node .next/standalone/server.js

See:

Docker docs: https://nextjs.org/docs/app/building-your-application/deploying#docker-image
Output standalone docs: https://nextjs.org/docs/pages/api-reference/next-config-js/output#automatically-copying-traced-files

@andriilive
Copy link
Author

My working app playground: Next.js in Docker for EasyPanel.

Repository:
https://github.com/digitalandyeu/next-with-docker

Step-by-step config guide with screenshots:
https://gist.github.com/andriilive/38e0c30ad0e68e01d0bfc5250998de50

Live example: url

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

No branches or pull requests

1 participant