Payload CMS + Nextjs Deployment Failed during build process
Using the template courtesy of @Brody with Next.js added as seen here, the UI states deployment fails during build process, however it appears that the build completes, but the push times out. Here's the repo and deployment ID is e2d1ce03-417c-4c0e-aa79-d31db48d0ac7
GitHub
GitHub - ballermatic/Payload-Railway
Contribute to ballermatic/Payload-Railway development by creating an account on GitHub.
18 Replies
Project ID:
e2d1ce03-417c-4c0e-aa79-d31db48d0ac7
does my unmodified template work?
Yes, it does. I'll ping the Payload crew also. The combined app works perfectly on local dev.
Push stalls at 3.069GB of 3.1GB
that's likely far too big for the image
what's the image size of my unmodified template?
I'll check. That does seem awfully large. The repo isn't exactly feature rich, either.
if the unmodified repo is large, I'll see what I can do to trim it down
Unmodified is 1.357GB
Next is more than doubling the footprint. Sheesh.
Would bumping my plan up to Pro solve for this?
i doubt it, ill see if i can optimize the dockerfile further
There are a pile of dev dependencies but very few for prod
"dependencies": {
"dotenv": "^16.3.1",
"express": "^4.17.1",
"path": "^0.12.7",
"next": "^13.4.19",
"next-sitemap": "^4.2.2",
"payload": "latest",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-wrap-balancer": "^1.1.0"
},
yeah i was planning on moving them around and doing a prune
I appreciate your help with this. Thank you so much.
no problem! 🙂
I could separate the front and back then use private networking for fetch calls etc. I was hoping a combined app would have less DevOps overhead but it appears I was mistaken.
thats the way id go regardless of image size
Understood. Generally how I do it too, but wanted to try this alternative approach.
got the image down to ~440mb by using nixpacks, dont know what i was doing wrong with the dockerfile given the final project files are under 1mb acording to ls, either way the template and repo has been updated and sorry for the inconvenience
Wow! That's great. Thank you so much!
no problem!