Predeployment command logs missing
sassyclaus
PROOP

a month ago

In my successful deployments today (2026-02-05), I have a predeploy command in my JSON railway config meant to handle DB migrations.

The command is this:

echo 'Running migrations...' && ./goose -dir migrations postgres $DATABASE_URL up

However, I don't see "Running migrations..." anywhere in the build or deployment logs and noticed that my db was unaffected. Therefore, I feel like I'm unable to troubleshoot issues with the db migration step.

Example deployment/build: dba1c8bd-6a80-40ac-9d9b-cdbcbbf20e18

Am I missing where I would find log output from the pre-deploy command?

$10 Bounty

2 Replies

Check your railway.json format ,preDeployCommand should be an array, not a string.
Should be "preDeployCommand": ["echo 'Running migrations...' && ./goose -dir migrations postgres $DATABASE_URL up"]


tsg-brent
PRO

12 days ago

That's not what the JSON schema indicates. It specifies that the preDeployCommand can be a string or an array of strings. However, I did switch my config over to it being an array of strings and saw different behavior:

Attachments


Loading...