I’ve been working on creating a developer friendly quickly deployable demo for PocketBase with Fly.io. While there are still some rough edges, I believe it creates a pretty compelling case for how one can create a distributed edge DB with SQLite and have nice a layer like PocketBase on top.
Clone or Download the copy of Gist. Once downloaded/extracted, and
cd into the directory.
- Follow the installation instructions from Install flyctl · Fly Docs.
fly auth signupto create a Fly.io account (email or GitHub).
fly auth loginto login.
- Create Fly app using
fly app create, fill in the information on prompts.
- Deploy on app using
fly deploy -a <application-name>, here
application-namewill be the name of app you created
- Scale the app to multiple pods you
fly scale count 2 -a <application-name>. At least have 2 pods for Marmot to
start a cluster, otherwise Marmot process won’t come up and wait for more than 1 nodes to come up.
Once cluster is started go to
http://<application-name>.fly.dev/_/ to launch admin panel, it will prompt you to create an
admin account. Choose your email and password. Once you hit create, it will create your admin account.
PocketBase might show you an error saying invalid token. If that happens just wait for a second or so to let
changes propagate. Try reloading
http://<application-name>.fly.dev/_/until you see login form. If issue
persists try creating account again.
Now you can play with your app’s API using
PocketBase Docs for deep dive.