We’re releasing persistent disks soon, you can try them out now if you’re curious.
flyctl 0.0.145-beta-3 introduces a
volumes command you can use to provision permanent disks for your applications.
Volumes are persistent, maintain their data between deploys, and even stick around if your app is suspended.
Creating a volume is simple, this creates a 25GB volume in
flyctl volumes create <name> --region ewr --size 25
To mount this volume at
/data, add this to your app config:
[[mounts]] source = "data" destination = "/data"
You can create multiple volumes with the same name, if you want to run an app in 3 regions, run these commands (and keep
[[mounts]] in your config the same):
flyctl volumes create data --region ewr --size 25 flyctl volumes create data --region cdg --size 25 flyctl volumes create data --region syd --size 25
- You can only mount one volume in a VM (we’re curious if you need more)
- We don’t have snapshots/backups available yet
- Your app can only scale to as many VMs as you have volumes. If you’ve created 3 volumes named “data”, your app can scale to 3 VMs.
Other things to know:
- The price is $0.15 per GB per month
- Performance will be better than general purpose EBS in most cases