flyctl to be version 0.1.9 or later.
Deploying a Rails project as a Fly.io Machine
Let’s start with a very simple Rails project:litefs.yml) and a number of changes to your dockerfile. Fly.io provides a dockerfile generator which will do this for you. Run it immediately after fly launch thus:
fly launch will prompt you for a name, region, and whether or not you want postgres or redis databases. Say no to the databases, you won’t need them for this demo.
generate dockerfile will prompt you whether or not you want to accept the changes. Feel free to peruse the diffs, but ultimately accept the changes. If you would rather not even be prompted to see the diffs, you can add a --force option the command.
Before we deploy, let’s make a one-line change to our fly.toml to keep our machines running so that we can ssh into them whenever we want:
fly apps open will open a
browser. Add one name.
Return back to your terminal window and run:
fly machines list -q. Once both instances
are running, enter the following command and select the instance that is
furthest from you:
Current limitations
- What Litefs Can Do Today describes current capabilities and future plans.