Skip to content
This repository was archived by the owner on Jul 6, 2025. It is now read-only.

BakirGracic/pocketbase-docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PocketBase Docker


PocketBase

What is PocketBase

PocketBase is an open-source backend (or BaaS) built as a single Go binary that provides:

  • Embedded SQLite Database with real-time subscriptions
  • Authentication and User Management
  • File Storage and Static File Serving
  • Admin Dashboard for easy management
  • REST-ish API server for integrations
  • Extendable using Go or JavaScript
  • and much more

Features of pocketbase-docker

  • Lean & Secure: Optimized using lightweight Alpine images and operation layering
  • Data Persistence: Configurable volumes for pb_data, pb_public, pb_migrations and pb_hooks persistance
  • Health Checks: Built‑in support for Docker health checks
  • Unofficial: Not opinionated, welcoming contributions
  • Configurable: Ability to configure some parameters

Getting Started

Prerequisites

  • Docker Engine (v20.10+)
  • Docker Compose (if using compose)

Defaults

  • Before starting PocketBase service, default superuser is created (in case pb_data directory doesn't exist) with [email protected] & Test123!!! credentials. Make sure to change credentials later!

Building the Image Yourself

git clone https://github.com/BakirGracic/pocketbase-docker
cd pocketbase-docker
docker build -t pocketbase:test_build .

Running the Container

Using Docker CLI

docker run -d \
  --name pocketbase \
  -p 8090:8090 \
  -v ~/pb/data:/app/pb_data \
  -v ~/pb/migrations:/app/pb_migrations \
  -v ~/pb/hooks:/app/pb_hooks \
  -v ~/pb/public:/app/pb_public \
  docker.io/bakirg/pocketbase-docker:latest

Using Docker Compose

services:
  pocketbase_service:
    image: docker.io/bakirg/pocketbase-docker:latest
    container_name: pocketbase_container
    restart: unless-stopped
    ports:
      - "8090:8090"
    volumes:
      - "~/pb/data:/app/pb_data"
      - "~/pb/migrations:/app/pb_migrations" 
      - "~/pb/hooks:/app/pb_hooks" 
      - "~/pb/public:/app/pb_public" 
    healthcheck:
      test: wget -q --spider http://localhost:8090/api/health || exit 1
      interval: 30s
      timeout: 5s
      retries: 3
      start_period: 5s

Accessing PocketBase

Contributing

I welcome contributions to improve the Docker images and configurations. Please open issues or pull requests on GitHub.

License

This project is licensed under the MIT License.

Contact

For any (adequate) inquiries, please contact [email protected].