From 1fd827fd74276c33e5eb32d6d2572962d51e6272 Mon Sep 17 00:00:00 2001 From: "J. Elfring" Date: Sun, 10 Nov 2024 12:20:03 +0100 Subject: [PATCH] first commit --- .gitignore | 1 + Dockerfile | 31 +++++++++++++++++++++++++++++++ README.md | 11 +++++++++++ docker-compose.yaml | 14 ++++++++++++++ 4 files changed, 57 insertions(+) create mode 100644 .gitignore create mode 100644 Dockerfile create mode 100644 README.md create mode 100644 docker-compose.yaml diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..4c49bd7 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.env diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..dd30780 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,31 @@ +FROM alpine:latest +LABEL maintainer "J. Elfring " + +ARG PB_VERSION=0.22.23 + +RUN apk add --no-cache \ + ca-certificates \ + unzip + +ADD --chown=daemon:daemon \ + https://github.com/pocketbase/pocketbase/releases/download/v${PB_VERSION}/pocketbase_${PB_VERSION}_linux_amd64.zip \ + /tmp/pb.zip + +RUN mkdir /pb \ + && chown daemon:daemon /pb + +USER daemon +WORKDIR /pb + +RUN unzip /tmp/pb.zip -d /pb/ + +# uncomment to copy the local pb_migrations dir into the image +# COPY ./pb_migrations /pb/pb_migrations + +# uncomment to copy the local pb_hooks dir into the image +# COPY ./pb_hooks /pb/pb_hooks + +EXPOSE 8080 + +# start PocketBase +CMD ["/pb/pocketbase", "serve", "--http=0.0.0.0:8080"] diff --git a/README.md b/README.md new file mode 100644 index 0000000..8da4831 --- /dev/null +++ b/README.md @@ -0,0 +1,11 @@ +# Pocketbase on Alpine Linux + +A minimal pocketbase installation on Alpine linux. + +## Versions +| Component | Version | +|--------------|-----------| +| Pocketbase | 0.22.23 | + +## Usage +See `docker-compose.yml` diff --git a/docker-compose.yaml b/docker-compose.yaml new file mode 100644 index 0000000..4397a14 --- /dev/null +++ b/docker-compose.yaml @@ -0,0 +1,14 @@ +services: + + pocketpase: + build: . + image: ${DOCKER_IMAGENAME:-pocketpase} + restart: unless-stopped + logging: + driver: json-file + options: + max-file: "2" + max-size: "500k" + volumes: + - ./pb_data:/pb/pb_data +