Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork371
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
-
If I'm deploying on Railway, I need a way to run
However, this makes tasks like Any ideas where I can incorporate this? |
BetaWas this translation helpful?Give feedback.
All reactions
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.
- With self hosting and Docker Compose you can run
./run manage migrate
before youdocker compose up
- With Kubernetes, you can use Helm or Argo CD to run it in hook that happens before your main app deployment gets deployed
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…
Replies: 1 comment
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
-
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. |
BetaWas this translation helpful?Give feedback.