Skip to content

Ideal place/point in time to run migrate? #60

Answered by nickjj
SHxKM asked this question in Q&A

You must be logged in to vote

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 you docker 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

You must be logged in to vote
0 replies
Answer selected by SHxKM
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants