Home

Awesome

<p align="center"> <a href="https://pocketbase.io/"><img alt="PocketBase logo" height="128" src="https://pocketbase.io/images/logo.svg"> <h1 align="center">Docker images for PocketBase</h1> </a> </p>

builds

archSupport
amd64
arm64
armv7

Docs

Checkout the docs at https://pocketbase.io/docs/

deploy

Quick run

docker run -v ./pb_data:/usr/src/app/pb_data --name pocketbase -p 8090:8090 kdpuvvadi/pocketbase:latest 

Pocketbase's admin UI will be avaiable at <ip>:8090/_/ and API at <ip>:8090/api/

With compose

git clone https://github.com/kdpuvvadi/pocketbase.git pocketbase
docker compose up -d

Production ready setup

It is recommended to use encryption for storing settings. Generate 32 charector random string with the following

openssl rand -hex 16

Docker compose with traefik reverse proxy

services:
  pocketbase:
    image: ghcr.io/kdpuvvadi/pocketbase:latest
    container_name: pocketbase
    volumes:
      - ./pb_data:/usr/src/app/pb_data
      - ./pb_public:/usr/src/app/pb_public
      - ./pb_hooks:/usr/src/app/pb_hooks
    environment:
      PB_ENCRYPTION_KEY: 32charkey # replace it with the one generated by $ openssl rand -hex 16
    ports: # optional if it is running behind proxy, good for debugging & health checks
      - 8090:8090
    command: --encryptionEnv=PB_ENCRYPTION_KEY
    labels:
      - "traefik.enable=true"
      - "traefik.docker.network=proxy" # replace it based on your setup
      - "traefik.http.routers.pb.entrypoints=https"
      - "traefik.http.routers.pb.rule=Host(`pb.example.net`)" # change it to fqdn
      - "traefik.http.routers.pb.middlewares=default-headers@file"
      - "traefik.http.routers.pb.tls=true"
      - "traefik.http.routers.pb.service=pb"
      - "traefik.http.services.pb.loadbalancer.server.scheme=http"
      - "traefik.http.services.pb.loadbalancer.server.port=8090"
    networks:
      - proxy # replace it based on your setup
    restart: unless-stopped
    healthcheck:
      test: curl --fail http://localhost:8090/api/health || exit 1
      interval: 30s
      retries: 5
      start_period: 10s
      timeout: 5s

networks:
  proxy: # replace it based on your setup
    external: true 

Support

If you encounter any issue with the images, feel free to reach out with issue or a PR.