Multiple fly volumes confusion

I’m trying to set up a simple app that has a SQLite database. Looking at a few other posts it seems like this is accomplished using the volumes feature. When I run the fly volumes create command, I get the warning:

Warning! Individual volumes are pinned to individual hosts. You should create two or more volumes per application. You will have downtime if you only create one. Learn more at Volumes · Fly Docs

Reading that doc page, it seems pretty critical to set up multiple volumes, but I haven’t been able to figure out how to do that. Other examples (remix-jokes/fly.toml at main · remix-run/remix-jokes · GitHub, GitHub - remix-run/indie-stack: The Remix Stack for deploying to Fly with SQLite, authentication, testing, linting, formatting, etc.) that I looked at seem to just mount a single volume, and the docs say that there’s one-to-one mapping between VMs and volumes.

How do I use multiple volumes for my app, as the warning suggests?

If you’re running vanilla SQLite then you’ll need to just run one volume. You’ll have a brief period of downtime when you deploy as only one VM can be attached to a volume at a time. During deployment, we stop the previous VM and restart it with the new version.

A similar question was asked recently that may help give some more context: So it's not possible to use SQLITE on fly without LiteFS ?

2 Likes

Thanks for the quick reply @benbjohnson!

1 Like

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