R
Railwayβ€’12mo 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β€’12mo ago
Project ID: e2d1ce03-417c-4c0e-aa79-d31db48d0ac7
Brody
Brodyβ€’12mo ago
does my unmodified template work?
nball
nballβ€’12mo 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β€’12mo ago
that's likely far too big for the image what's the image size of my unmodified template?
nball
nballβ€’12mo ago
I'll check. That does seem awfully large. The repo isn't exactly feature rich, either.
Brody
Brodyβ€’12mo ago
if the unmodified repo is large, I'll see what I can do to trim it down
nball
nballβ€’12mo 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β€’12mo ago
i doubt it, ill see if i can optimize the dockerfile further
nball
nballβ€’12mo 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β€’12mo ago
yeah i was planning on moving them around and doing a prune
nball
nballβ€’12mo ago
I appreciate your help with this. Thank you so much.
Brody
Brodyβ€’12mo ago
no problem! πŸ™‚
nball
nballβ€’12mo 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β€’12mo ago
thats the way id go regardless of image size
nball
nballβ€’12mo ago
Understood. Generally how I do it too, but wanted to try this alternative approach.
Brody
Brodyβ€’12mo 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
nballβ€’12mo ago
Wow! That's great. Thank you so much!
Brody
Brodyβ€’12mo ago
no problem!