I have a volume mounted on my app, and i want to use the app with no volumes on it.
If i try to deploy the app without the volume mount section i get:
Error: machine 6e823e2c7e6387 [app] has a volume mounted but app config does not specify a volume; remove the volume from the machine or add a [mounts] section to fly.toml
You’ll need to destroy the Machine the volume is attached to first.
fly machine destroy <machine ID> --force
Then you should be able to delete the volume using:
fly volumes delete <volume ID>
If you have more than one Machine with attached volumes in your app, then you can scale down to zero Machines, destroy the volumes, then run fly deploy and scale back up (since you’ve already deleted the mounts section in your fly.toml).
Also, if you do scale down to zero machines and then redeploy, you’ll get the recommended two Machines for high availability. If you only want one Machine you can add the --ha=false flag to the deploy command: