PocketBase Docker Compose Example

Usage

$ docker compose up -d

Latest Version

services:
  pb:
    image: ghcr.io/yk-lab/pocketbase:latest
    command: [ "serve", "--http", "0.0.0.0:8090" ]
    volumes:
      - pb_data:/pb_data
    ports:
      - "${PORT:-8090}:8090"

volumes:
  pb_data:

Specify Version

services:
  pb:
    build:
      context: .
      args:
        - VERSION=0.16.5
        - PORT=${PORT:-8090}
    command: [ "serve", "--http", "0.0.0.0:${PORT:-8090}" ]
    volumes:
      - pb_data:/pb_data
    ports:
      - "${PORT:-8090}:${PORT:-8090}"

volumes:
  pb_data:

OR

services:
  pb:
    image: ghcr.io/yk-lab/pocketbase:0.16.5
    command: [ "serve", "--http", "0.0.0.0:8090" ]
    volumes:
      - pb_data:/pb_data
    ports:
      - "${PORT:-8090}:8090"

volumes:
  pb_data:

Run Update

$ docker compose run --rm pb ./pocketbase update