2 years ago
Am using github branch auto deploy and just bumped into this post https://help.railway.app/feedback/pre-and-post-deployment-actions-2c2a4b35. Realised there's no way to run db:migrate command. Why is something fundamental like this not taken care of? Is there a workaround?
0 Replies
2 years ago
run db:migrate in your start command
what if i have multiple server replicas? i have to make sure db:migrate command is guarding against concurrent db:migrate run?
2 years ago
have a single service do the migrations
2 years ago
you would have your main app service with all its replicas, and another migrator service that does the migrations and exits
is there a way to ensure this single service runs db migrate first? only then deploy the others with the auto deploy? i guess can only be done via github actions with railway cli?
2 years ago
railway does not have a way to define what services run first
2 years ago
i have seen software have a wait for migrations job thats runs before the app starts
i guess i probably reading the wrong doc https://docs.railway.app/reference/deployments can't seem to find the deployment order thing
2 years ago
there is no way to define deployment order at this time
railway does have a way to define what services run first
what's this referring to?
2 years ago
im so sorry
2 years ago
bad typo, my bad