Skip to content

CUBETIQ/cubis-packetbase

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Cubis PacketBase

A lightweight, self-hosted backend solution based on PocketBase. This Docker-based deployment provides a scalable, open-source alternative for building modern applications with built-in authentication, database, and real-time capabilities.

Features

  • Lightweight: Built on Alpine Linux for minimal resource consumption
  • Self-Hosted: Deploy on your own infrastructure
  • Multi-Architecture: Supports both amd64 and arm64 architectures
  • Docker-Ready: Pre-configured Dockerfile for easy deployment
  • PocketBase Powered: Full PocketBase v0.35.0 capabilities including:
    • User authentication and authorization
    • SQLite database with auto-migrations
    • Real-time subscriptions
    • File storage and REST API

Quick Start

Using Docker

# Pull the latest image
docker pull ghcr.io/cubetiq/cubis-packetbase:latest

# Run the container
docker run -d \
  -p 8080:8080 \
  -v pb_data:/pb/pb_data \
  --name packetbase \
  ghcr.io/cubetiq/cubis-packetbase:latest

# Run with automatic superuser creation
docker run -d \
  -p 8080:8080 \
  -v pb_data:/pb/pb_data \
  -e POCKETBASE_ADMIN_EMAIL=admin@example.com \
  -e POCKETBASE_ADMIN_PASSWORD=your-secure-password \
  --name packetbase \
  ghcr.io/cubetiq/cubis-packetbase:latest

Using Docker Compose

services:
    packetbase:
        image: ghcr.io/cubetiq/cubis-packetbase:latest
        ports:
            - '8080:8080'
        volumes:
            - pb_data:/pb/pb_data
        environment:
            - PB_VERSION=0.35.0
            # Optional: Auto-create superuser on first run
            - POCKETBASE_ADMIN_EMAIL=admin@example.com
            - POCKETBASE_ADMIN_PASSWORD=your-secure-password
        restart: unless-stopped

volumes:
    pb_data:

Building Locally

# Build the Docker image
docker build -t cubis-packetbase:latest .

# Run the container
docker run -d \
  -p 8080:8080 \
  -v pb_data:/pb/pb_data \
  cubis-packetbase:latest

Configuration

Environment Variables

  • PB_VERSION: PocketBase version to download (default: 0.35.0)
  • POCKETBASE_ADMIN_EMAIL: (Optional) Email for initial superuser - auto-created on first run
  • POCKETBASE_ADMIN_PASSWORD: (Optional) Password for initial superuser - auto-created on first run

Volume Mounts

  • /pb/pb_data: Persistent storage for database and files

Custom Hooks and Migrations

Uncomment the corresponding lines in the Dockerfile to include:

# Copy local pb_migrations directory
COPY ./pb_migrations /pb/pb_migrations

# Copy local pb_hooks directory
COPY ./pb_hooks /pb/pb_hooks

Access PocketBase

Once the container is running, access the admin dashboard at:

http://localhost:8080/_/

Supported Architectures

  • linux/amd64 - Intel/AMD 64-bit processors
  • linux/arm64 - ARM 64-bit processors (including Apple Silicon)

Automatic architecture selection is handled by Docker when pulling the image.

GitHub Container Registry

Images are automatically built and published to GitHub Container Registry on:

  • Every push to main, master, or develop branches
  • Every pull request
  • Every git tag matching v* pattern

Image Tags

  • latest - Latest build from default branch
  • main, master, develop - Branch-specific tags
  • vX.Y.Z - Semantic version tags
  • branch-<commit-sha> - Commit-specific tags

Documentation

License

This project is based on PocketBase, which is licensed under the MIT License.

Contributors

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages