-
If I'm deploying on Railway, I need a way to run
However, this makes tasks like Any ideas where I can incorporate this? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi, I treat migrations as a separate deploy step that's agnostic to how the app is deployed. Ultimately the use case is to run a migration before the new version of your application goes live.
I never used Railway but I'm guessing they have a way to run any arbitrary commands before or after a release goes out? I like this strategy because running it in an entrypoint has implications when you want to horizontally scale your app and you have 10 copies of your app all running the migrate command. Technically migrations are idempotent but there's still benefits to have an application deployment get blocked from being deployed because a previous unrelated step (running a migration) failed. Separation of concerns. |
Beta Was this translation helpful? Give feedback.
Hi,
I treat migrations as a separate deploy step that's agnostic to how the app is deployed.
Ultimately the use case is to run a migration before the new version of your application goes live.
./run manage migrate
before youdocker compose up
I never used Railway but I'm guessing they have a way to run any arbitrary commands before or after a release goes out?
I like this strategy because running it in an entrypoint has implications when you want to horizontally scale your app and you have 10 copies of your app all run…