Pre-deploy succeeds but status is 'failed'
twoabove
PROOP

10 months ago

So this is an odd error - I have a db migration script as a predeploy step. The logs show that it's completed successfully

2025-12-14T16:11:48.000000000Z [inf]  Starting Container
2025-12-14T16:11:49.377307088Z [inf]  server db:migrate: No config path provided, using default 'drizzle.config.ts'
2025-12-14T16:11:49.377311493Z [inf]  server db:migrate: Reading config file '/app/apps/server/drizzle.config.ts'
2025-12-14T16:11:49.377315984Z [inf]  server db:migrate: Using 'pg' driver for database querying
2025-12-14T16:11:49.377319252Z [inf]  server: [⣷] applying migrations...[⣯] applying migrations...[✓] migrations applied successfully!
2025-12-14T16:11:49.377323589Z [inf]  server db:migrate: Exited with code 0
2025-12-14T16:11:54.000000000Z [inf]  Stopping Container

But right after this step, the release status is 'failed', and I don't have any information about what exactly failed, only

Deploy › Pre deploy command (00:32)

Pre-deploy command failed

But it exited with code 0?

What might I be missing?

$20 Bounty

3 Replies

twoabove
PROOP

10 months ago

Running the same migration from my local and redeploying this is fixed! But I'm still not sure why this would error


chinanderm
PRO

10 months ago

My services have been having this issue since yesterday. Build and Pre-Deploy succeeds but then the whole deploy process fails without any information as to why. A redeploy will usually resolve it.


twoabove
PROOP

10 months ago

Thanks chinanderm! I did try redeploying, but that didn't fix it.

But what did was to run the migration from my local and then redeploy. I suspect that made the migration during the deploy a no-op which made the pre-deploy step pass!


Welcome!

Sign in to your Railway account to join the conversation.

Loading...