Does a manual restart rerun pre-deploy commands?
Anonymous
HOBBYOP

4 hours ago

Hello Railway team,

We need clarification of platform behavior before a controlled staging

restart.

Our currently successful Web deployment uses:

  • Dockerfile build
  • Runtime V2
  • One replica
  • Pre-deploy command: python manage.py migrate --noinput
  • Railway CLI 5.45.2

We intend to use railway restart on the existing deployment, without

changing source, image, configuration or variables.

Please confirm:

  1. Does this manual restart execute the configured pre-deploy command

    again, or is that step skipped?

  2. Is the answer also applicable to the Dashboard Restart action?

    We are not asking about redeploy, automatic crash recovery or

    platform-initiated host migration.

  3. What supported event/metadata can identify the restart and whether

    a pre-deploy execution was scheduled for that event?

Our test requires no migration-command invocation, not merely no new

migrations applied. Reusing the image or observing unchanged migration

records does not distinguish those conditions.

Please provide an explicit statement of the supported behavior or a

documentation reference. Please do not restart or modify our services

while answering this question.

Thank you.

Awaiting Railway Response

2 Replies

Railway
BOT

3 hours ago

A railway restart (and the equivalent Dashboard Restart action) restarts the process within the existing deployment's container without creating a new deployment, so the pre-deploy command does not run. Pre-deploy commands execute only as part of the full build-then-deploy lifecycle, which a restart skips entirely. You can confirm this by checking your deployment logs after the restart: no new deployment entry will appear, and no PRE_DEPLOY_COMMAND step will be listed in the deployment's event timeline. A railway redeploy, by contrast, creates a new deployment from the same source and does execute the pre-deploy command. See railway restart and Pre-Deploy Command for reference.


Status changed to Awaiting User Response Railway about 3 hours ago


Anonymous
HOBBYOP

2 hours ago

Thank you. The automated response says that CLI and Dashboard Restart skip

pre-deploy, which addresses the behavior we need to establish.

Could a Railway team member explicitly confirm this, or point us to the

exact official documentation passage that states it?

Specifically: for a successful deployment with

“python manage.py migrate --noinput” configured as its pre-deploy command,

does a manual CLI/Dashboard Restart skip that command entirely when no

source or configuration changes are made?

Our requirement is no migration-command invocation, not merely no rebuild

or no new migrations applied. We are not asking about Redeploy.

Please answer without restarting or modifying our services.


Status changed to Awaiting Railway Response Railway about 2 hours ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...