Auto extend volumes - fly.toml edition!

We recently added a new thing to our Machines API that lets you Auto Extend Volumes after a certain threshold. Now, as of flyctl v0.1.127, this feature has come to your fly.toml too!

I’ve created a livebook example here: fly-apps/livebook-with-auto-volume-extension-example (Im bad at naming things!)

How to use this?

For the fly.toml we decided on this UX:

[[mounts]]
  source = "data"
  destination = "/data"
  auto_extend_size_threshold = 80
  auto_extend_size_increment = "1GB"
  auto_extend_size_limit = "5GB"

All fields live under mounts as auto_extend_*, the GB fields being string in the format XGB.

If you have an existing app don’t forget to fly deploy after changing your fly.toml

Hope you enjoyed this update and see you next time

12 Likes

Love this! Is it possible to apply this config to fly pg?

1 Like

@singee I guess you could try generating the fly.toml of the postgres app, add the auto_extend_* options and deploy it again.

Basically follow the same steps showed here: Scale to zero for Postgres Development projects · Fly Docs

2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.