Configure "order" in which regions deploy

Hello,

The short version is this:

How can I configure the order in which my regions deploy? At the moment, when I have a multi-region app and I deploy, it attempts to spin up nodes in regions in alphabetical order (why?).

I would like to be able to spin up a node in my primary region first.

The long version is - I have code that relies on a migration being run. I have a distributed Postgres DB and I’m using fly_postgres. Migration cannot run in replica region DB :frowning: which makes sense.

I am at the point of considering scaling down to a single region just for this deploy and scaling up when deploy is successful but boy howdy isn’t that an ugly hack?

Any advice is appreciated. Would like to configure “region order” of deployments.

I believe, the singleton VM spun up by release_command is ran in the primary_region: App Configuration (fly.toml) · Fly Docs

Also, there’s a lot more control to be had over deploys if you use Machines. Though, giving up even more control and offloading database to a managed provider (like PlanetScale or EdgeDB, say) is perhaps the easiest of options (vendor lock-in not withstanding)?

1 Like