How would I update my codebase?

I have a scenario where I may need to update my codebase relatively frequently and I have some questions about doing that.

  • Is there a way of deleting images from the fly.io registry, so I don’t incur storage for images which I no longer need? Or does fly.io automatically dispose of images which are no longer in use?

  • On a code change, would I need to remove an app and deploy again, or is there a simpler way?

Any help is appreciated :sweat_smile:

Well, for a code change you don’t need to remove the app. Just do a deploy. And the deploy will create a new version of it (each is numbered). And create a new vm. And when that new vm (with the new code on it) passes any healthchecks you have in your fly.toml file, it replaces the old one. You can look at deployment strategies (the --strategy flag) depending on how you want the vms to be replaced:

As for images in the registry, I’m not sure you are billed for them :thinking: As far as I know, the storage Fly refers to for billing is that used by volumes. Which you can mount to your app to persist storage. When I’ve looked at a list of releases they all seem to be there. I agree it would be interesting to know Fly’s policy regarding their age or whether there is any limit on how many they store. But I guess if they are not billed-for, it doesn’t really matter how many they keep.

2 Likes