Why
I really like pocketbase; it can be easily hosted, is portable and completely open source. But there is a problem; it’s not that easy to self host multiple instances on a single machine while managing the separate databases and all that kind of stuff. That why I build pockets. Pockets is a way to manage multiple pocketbase instances on a single machine.
How
Pockets is built around OCI containers (in this case Docker, but it could also work with Podman) to provide completely isolated instances of pocketbase
Protocol
All communication between pockets and its clients (for now a simple CLI) happens using RPC. They are defined in a protobuf file (that you can find here) that is used to generate both the server definition and the clients.
CLI
The cli is built using cobra and viper, as well as some packages from charm. It provides a simple way to connect to and manage a pockets instance.
Server
The server defines all the methods described in the protobuf file and handles the connection with Docker to create, run and manage the different containers and images.
Notable point
For maximum independence of each instance, all the Pocketbase images that are used are generated locally on the instance machine. This allows users to be certain that their images are not compromised (which might be the case when coming from a remote registry - though it is highly unlikely I’d admin).