4 months ago
My MedusaJS v2 app (in a Yarn 4 monorepo) enters a deployment loop on Railway where migrations and admin build complete successfully but then restart 3 times before failing. I've tried various approaches including combining all commands into a single script (medusa db:migrate && medusa build && medusa start) but Railway still appears to interpret this as a crash and retries the deployment
My build command under Nixpacks is: cd apps/backend && yarn install --immutable
And my start command is:cd apps/backend && yarn predeploy && yarn start
with predeploy being: medusa db:migrate .
It is likely something on my end since everything fails every time but I can't figure out why.
3 Replies
4 months ago
Hey there! We've found the following might help you get unblocked faster:
If you find the answer from one of these, please let us know by solving the thread!
4 months ago
Move the pre-deploy out of the start command and into predeploy, https://docs.railway.com/guides/pre-deploy-command
Status changed to Solved brody • 4 months ago
