Today we are going to dive into PocketBase and set it up!
π‘ What's PocketBase?
PocketBase is an open-source Backend-as-a-service (BaaS). It offers all necessary needed features like authentication, file storage, realtime database and web dashboard.
PocketBase uses an SQLite Database behind the scene and is written in Go. They offer an awesome JavaScript/Go SDK and you can even extend it by using it as a Go Framework.
You are able to configure permission rules, OAuth2, external file storage (S3) and mail (SMTP).
Β π οΈ Setup Pocketbase
The setup of Pocketbase is so easy it takes less than 1 minute to be able to start using it!
Download & extract
Download the archive from the documentation that's correct for you operating system. Now move it in the root folder in your project.
Next extract the archive and you should be left with a folder which contains an executable (pocketbase
).
Start Pocketbase
Move into this directory and run the ./pocketbase serve
command.
cd ./<directory
./pocketbase serve
And you are all set up! Visit the Admin UI page to setup your admin account and start using PocketBase!
π³ Setup via docker-compose
In the favor of many developers there's a way to set it up via Docker as well.
Repo: https://github.com/muchobien/pocketbase-docker
Even easier than above you just add the pocketbase to your docker-compose.yml
file like that:
version: "3.7"
services:
pocketbase:
image: ghcr.io/muchobien/pocketbase:latest
container_name: pocketbase
restart: unless-stopped
command:
- --encryptionEnv #optional
- ENCRYPTION #optional
environment:
ENCRYPTION: example #optional
ports:
- "8090:8090"
volumes:
- /path/to/data:/pb_data
- /path/to/public:/pb_public #optional
After starting your docker stack it automatically installs and sets up PocketBase and you're instantly ready to start working!
Top comments (0)