6 months ago
I have multiple apps and have a pre-deploy, but don't want both services to run the pre-deploy task (otherwise could have migrations colliding with one another)
Even if I have a separate container, how would I orchestrate it so the container with the migration run first?
7 Replies
Use Cursor.sh and it came up with a clever way to use Database Advisory Locks.
Here's the script
6 months ago
To clarify @Mint Avenger , did that script solve your issue or are you still looking for a solution?
6 months ago
If you’re using GitHub Actions, you can handle migrations there and configure each service to toggle Wait for CI.
Attachments
That script solved my issue. It handles multiple containers trying to migrate.
6 months ago
Wonderful.
6 months ago
!s
Status changed to Solved noahd • 6 months ago