GithubHelp home page GithubHelp logo

pocketbase-docker's Introduction

pocketbase logo

Docker image for PocketBase

Latest Pocketbase Version Supported docker archs


Supported Architectures

Simply pulling ghcr.io/muchobien/pocketbase:latest should retrieve the correct image for your arch.

The architectures supported by this image are:

Architecture Available
amd64
arm64
armv7

Version Tags

This image provides various versions that are available via tags. Please read the descriptions carefully and exercise caution when using unstable or development tags.

Tag Available Description
latest Stable releases from PocketBase
x.x.x Patch release from PocketBase
x.x Minor release from PocketBase
x Major release from PocketBase

Application Setup

Access the webui at <your-ip>:8090, for more information check out PocketBase.

Usage

Here are some example snippets to help you get started creating a container.

docker-compose (recommended)

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
      - /path/to/hooks:/pb_hooks #optional
    healthcheck: #optional (recommended) since v0.10.0
      test: wget --no-verbose --tries=1 --spider http://localhost:8090/api/health || exit 1
      interval: 5s
      timeout: 5s
      retries: 5
docker run -d \
  --name=pocketbase \
  -p 8090:8090 \
  -e ENCRYPTION=example `#optional` \
  -v /path/to/data:/pb_data \
  -v /path/to/public:/pb_public `#optional` \
  -v /path/to/hooks:/pb_hooks `#optional` \
  --restart unless-stopped \
  ghcr.io/muchobien/pocketbase:latest \
  --encryptionEnv ENCRYPTION `#optional`

Built the image yourself

Copy Dockerfile and docker-compose.yml to the root directory, then update the docker-compose.yml file to build the image instead of pulling:

version: "3.7"
services:
  pocketbase:
    build:
      context: .
      args:
        - VERSION=0.22.10 # <--------- Set the Pocketbase version here. It will be downloaded from their GitHub repo
    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
      - /path/to/hooks:/pb_hooks #optional
    healthcheck: #optional (recommended) since v0.10.0
      test: wget --no-verbose --tries=1 --spider http://localhost:8090/api/health || exit 1
      interval: 5s
      timeout: 5s
      retries: 5

Related Repositories

pocketbase-docker's People

Contributors

dependabot[bot] avatar krosf avatar m-ocean-it avatar trevoready avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pocketbase-docker's Issues

How to add hooks

Hi,
This Docker image was a lifesaver, so thank you.
This may be a dumb question but I'm a bit of a noob to this, how do I add pb hooks using this image? Iv'e tried just mounting it as a volume to /pb_hooks but that does't seem to work.
Thanks!

Pocketbase container keeps restarting !

I used docker cli to create a container for pocketbase as provided in readme.
Everything worked fine until I clicked on restore pocketbase backup. After this, it just keeps restarting.

What I have tried

  • docker kill pocketbase
  • docker stop pocketbase

Even after this when I start the container. It only shows status as restarting.

Below is the output of docker ps

CONTAINER ID   IMAGE                                 COMMAND                  CREATED          STATUS                          PORTS     NAMES
f921b535309a   ghcr.io/muchobien/pocketbase:latest   "/usr/local/bin/pock…"   14 minutes ago   Restarting (1) 48 seconds ago             pocketbase

does it support hooks?

volumes:
- ./pb_data:/pb_data
- ./pb_migrations:/pb_migrations
- ./pb_hooks:/pb_hooks

---- to update, just added

entrypoint: /usr/local/bin/pocketbase serve --http=0.0.0.0:8090 --dir=/pb_data --hooksDir=/pb_hooks

APP_URL environment variable doesn't seem to have an effecct

Hello.
I'm currently trying to setup pocketbase like this:

version: "3.7"
services:
  pocketbase:
    image: ghcr.io/muchobien/pocketbase:latest
    container_name: pocketbase
    restart: unless-stopped
    ports:
      - "8000:8090"
    volumes:
      - /opt/pocketbase/data:/pb_data
      - /opt/pocketbase/public:/pb_public
    environment:
      - APP_URL=http://IP_ADDRESS:8000

Is there a reason pocketbase doesn't see this environment variable ? When I echo from inside the container it's the right value, but in mail templates pocketbase keeps using localhost:8090

Issue with migrate collections

Hi and thank you for making it easy to deploy Pocketbase with Docker.

I have run into a slight issue which I can only replicate when running Pocketbase in a Docker container using your image. I've replicated this on multiple versions including the latest 0.18.10.

When running pocketbase migrate collections (either in Docker desktop or using docker compose exec -it pocketbase sh -c "/usr/local/bin/pocketbase migrate collections"), I get this error: Failed to fetch migrations list: SQL logic error: no such table: _collections (1)

As said, this does not happen if I just download the executable and perform the same command. I'm not sure whether this is even an issue with your image, but perhaps you or someone here might know how to solve it.

Can't Submit Most Forms

When I try to update SMTP, Application Settings, or add an Auth Provider, I get a generic error An error occurred while submitting the form.

Forgive my newbie-ness, but I don't see any errors in container log - should I be looking somewhere else?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.