Having some trouble with LiteFS speedrun

I’m trying to follow the instructions here: Speedrun: Add LiteFS to your app · Fly Docs

I’ve got an app that I’ve successfully deployed using SQLite on regular volumes. But what I don’t quite understand is what is the connection between my existing fly.toml file and the litefs.yml file I’m making.

At any rate when I run this command:

fly volumes create litefs --size 10

It creates the volume in my existing app (I think?)

But then when I run the next command:

fly launch

it asks if I want to use the existing fly.toml and when I say yes it renames the app in fly.toml, adding a suffix, presumably to make it unique, with the result that the volume I just made is in the old app which is different from the app I’m about to deploy.

Am I understanding that right. Should I do the fly launch first? Or edit fly.toml back to the old name before I do fly deploy?

Feels like there are some steps that aren’t explained here.

So I tried skipping fly launch and just doing fly deploy after I made the necessary changes to my fly.toml. That seemed to kinda work except then I got this warning/error:

WARNING The app is not listening on the expected address and will not be reachable by fly-proxy.
You can fix this by configuring your app to listen on the following addresses:
  - 0.0.0.0:3000
Found these processes inside the machine with open listening sockets:
  PROCESS        | ADDRESSES                             
-----------------*---------------------------------------
  /.fly/hallpass | [fdaa:2:6cc0:a7b:181:d85d:66dc:2]:22  
  litefs mount   | [::]:20202  

So then I changed http_service.internal_port in fly.toml to 20202 and it made that error go away. But things still don’t quite seem to be working. And I’m still confused who are what is supposed to be looking at litefs.yml? The LiteFS proxy? In which case does the file have to be named that (and is that the right name)?

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