R
Railway11mo ago
nball

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
Percy
Percy11mo ago
Project ID: e2d1ce03-417c-4c0e-aa79-d31db48d0ac7
Brody
Brody11mo ago
does my unmodified template work?
nball
nball11mo ago
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
Brody
Brody11mo ago
that's likely far too big for the image what's the image size of my unmodified template?
nball
nball11mo ago
I'll check. That does seem awfully large. The repo isn't exactly feature rich, either.
Brody
Brody11mo ago
if the unmodified repo is large, I'll see what I can do to trim it down
nball
nball11mo ago
Unmodified is 1.357GB Next is more than doubling the footprint. Sheesh. Would bumping my plan up to Pro solve for this?
Brody
Brody11mo ago
i doubt it, ill see if i can optimize the dockerfile further
nball
nball11mo ago
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" },
Brody
Brody11mo ago
yeah i was planning on moving them around and doing a prune
nball
nball11mo ago
I appreciate your help with this. Thank you so much.
Brody
Brody11mo ago
no problem! 🙂
nball
nball11mo ago
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.
Brody
Brody11mo ago
thats the way id go regardless of image size
nball
nball11mo ago
Understood. Generally how I do it too, but wanted to try this alternative approach.
Brody
Brody11mo ago
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
nball
nball11mo ago
Wow! That's great. Thank you so much!
Brody
Brody11mo ago
no problem!