Recommended approach to run a Sqlite Web GUI?

Just signed up for a new fly account today, was able to migrate our Sqlite Blazor Server (LiveView but for the .NET stack) app over from EC2, honestly found the entire experience super simple and straightforward so kudos for creating an awesome service!

I’m currently running Litestream in the same container as the dotnet app per this guide. Something we’ve previously gotten a lot of benefit from is running NocoDB on the same EC2 instance on a different port with a custom subdomain routing to it via Cloudflare Tunnel (the Blazor Server app was also exposed via a tunnel). That allowed us to have a convenient web admin gui to the underlying Sqlite db with write access.

It’s not super clear to me what the best way is to recreate this setup in Fly.io. I briefly noticed some posts around running multiple processes either via a single container using a process manager or the experimental [processes] section, but neither approach made it clear how to make the second web app (running nocodb) routable.

Let me know if I’m thinking about the problem all wrong, or if there are other solutions folks have found for using GUIs with write access to production Sqlite databases.

Hey, thank you for posting that question. I am trying to achieve something similar: dynamically/programmatically create machines and route to them using a subdomain (with the name of that new machine).
Did you find a way in the meantime?

The main thing to deal with is the fact that your users would access a hostname (sqlite-gui.fly.dev as an example) which is transparently load-balanced among your app servers.

To handle this, you can use dynamic request routing to have the front-end application determine which backend server needs to serve a request and then respond with a fly-replay header designating the specific machine that needs to process it. The proxy then “replays” the request as originally received but on the designated machine, and then ships the response back to the user.

You can use the Machines API to provision backend machines on demand and then route requests to them as I described.

A more worked-out solution is described here as well, so you can get an idea of how fly-replay works.

  • Daniel