next.js dockerfile
So i use a dockerfile for my nextjs app, and it works and complete with success. But as soon i try to go to the url provided by railway i just get
Application failed to respond
10 Replies
Project ID:
N/A
please read this docs page https://docs.railway.app/guides/fixing-common-errors
so the start cmd whould be?
next start --port ${PORT-3000}
the start script in your package.json but yes
Yes alr thanks for the help!
@Brody So i dont why its still not showing up. I have added the
its fixed
PORT
as env variable. And updated the start command.awesome, what was the fix?
Just needed to set the start cmd correctly too
npx prisma genarate && npm run start
and it was without Dockerfile.perfect!
Yea!
Also, on a sidenote, you could check out the with-docker example of Next.js which has a slightly more advanced and a lot more compact base image than a full on debian image does