Since PostgreSQL Clusters are in first-class support on Fly and Postgres is commonly a main application dependency, it would be great developer experience, if the database can be configured in the TOML file and auto-provisioned together with the application and attached.
For example:
[build]
...
[env]
...
[database]
count = 2 // defaults to 1
region = lhr // defaults to the app region
volume_size = 20 // defaults to 10
fly launch will prompt you to (optionally) create a postgres cluster or attach to an existing one
Region management will update an app and the associated postgres with one command
Adding a database block to the config is interesting, we’ve been experimenting with defining “requirements” for an app to run. That might be a good way to do it it.
If an OSS project can provide a “Deploy to Fly” button and a single config file (fly.toml) that provisions the application dependencies, that would be fantastic. Similar to the Heroku button and the app.json config.
Also in scripting scenarios, you can run a single flyctl deploy and provide the config file.