Postgres deployment stuck at PRE_DEPLOY_COMMAND despite empty config
jacktheripya-hub
HOBBYOP

14 days ago

My PostgreSQL service repeatedly fails at PRE_DEPLOY_COMMAND even though the current Railway service configuration explicitly shows preDeployCommand: [].

Two fresh deployment attempts have failed identically. SNAPSHOT_CODE completes successfully, then PRE_DEPLOY_COMMAND fails with “Pre-deploy command failed.” The configured PostgreSQL start command is never reached.

The service uses the official postgres:16 image. Historically, there was a faulty pre-deploy command, but it has been removed. Railway's deployment diagnostics also report that the command has been cleared and suggest a fresh deployment should succeed. Fresh deployments nevertheless continue to fail at the same PRE_DEPLOY_COMMAND stage.

Could Railway staff please check whether an old pre-deploy command remains cached or persisted somewhere not exposed by the current service configuration?

There is an existing persistent PostgreSQL volume containing data, so I do not want to delete, detach, replace or reformat the volume while troubleshooting.

I can provide project, service and deployment IDs privately if Railway staff need them.

Also remove Project: VanWise-TC1, the Project ID, Service ID, and deployment IDs that are currently visible in your draft.

Keep your existing title. Then you can safely press Create Public Thread.

One other thing: the page says “5 similar threads found.” Before submitting, it may be worth tapping Show—there's a chance Railway already has a known fix for this exact problem.

Solved

1 Replies

Status changed to Awaiting Railway Response Railway • 14 days ago


14 days ago

The Redeploy action creates a new deployment with the exact same build/deploy configuration as the original, including any pre-deploy command that was set at the time. Clearing the pre-deploy command in the service settings does not retroactively update previous deployments, so redeploying one of them still runs the old command.

To deploy with your current (cleared) configuration, open the command palette (CMD+K on Mac, CTRL+K on Windows/Linux) and select "Redeploy source image". This creates a fresh deployment that reads your current service settings. Your volume data is not affected.


Status changed to Awaiting User Response Railway • 14 days ago


Status changed to Solved noahd • 14 days ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...