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