fly launch.
This guide assumes you already have a working
Dockerfile for
your app. If not, get that working (with regular sqlite), and then come
back here!Let’s do this!
1. Configure litefs.yml
Copy the samplelitefs.yml file
from the litefs-example repo, and make the following updates:
- Update from
8081inproxy.targetto whatever port your app listens on - Update
exec[0].cmdto the command that runs your app
2. Update your Dockerfile
Install LiteFS dependencies:ENTRYPOINT (or CMD):
- Set up & deploy to the Fly Platform
Create a volume:
FLY_CONSUL_URL secret for your app, which is required for LitefS leases):
fly.toml file to mount your volume: