From 5ac27fa954a880ec8ecdc5365ca4c31a5918bdea Mon Sep 17 00:00:00 2001 From: eloi Date: Fri, 7 Jun 2024 23:55:55 +0200 Subject: [PATCH] Initial commit --- Dockerfile | 22 ++++++++++++++++++++++ README.md | 4 ++++ docker-compose.yml | 14 ++++++++++++++ 3 files changed, 40 insertions(+) create mode 100644 Dockerfile create mode 100644 README.md create mode 100644 docker-compose.yml diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..44ad30a --- /dev/null +++ b/Dockerfile @@ -0,0 +1,22 @@ +FROM alpine:latest + +ARG PB_VERSION=0.22.13 + +RUN apk add --no-cache \ + unzip \ + ca-certificates + +# download and unzip PocketBase +ADD https://github.com/pocketbase/pocketbase/releases/download/v${PB_VERSION}/pocketbase_${PB_VERSION}_linux_amd64.zip /tmp/pb.zip +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"] \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..2120d07 --- /dev/null +++ b/README.md @@ -0,0 +1,4 @@ +# PocketBase-Docker + +Simple Docker configuration to deploy PocketBase on my VPS. + diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..f303873 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,14 @@ +name: pocketbase + +services: + pocketbase: + build: . + + ports: + - "8080": "8080" + + volumes: + - pb_data:/pb/pb_data + +volumes: + pb_data: \ No newline at end of file