Compare commits

...

4 Commits

Author SHA1 Message Date
a2aced39b3 Workflow: Fix multiline run
All checks were successful
Build Pocketbase Docker Image / pocketbase-docker (push) Successful in 7s
2025-02-02 20:49:48 +01:00
964ba6bdce Workflow: Fix pocketbase workflow branch name 2025-02-02 20:49:35 +01:00
02879f0787 Workflow: Update pocketbase workflow steps 2025-02-02 20:49:35 +01:00
8d0ba8bfe4 Workflow: Add pocketbase docker workflow 2025-02-02 20:49:35 +01:00
2 changed files with 51 additions and 0 deletions

View File

@ -0,0 +1,29 @@
name: Build Pocketbase Docker Image
on:
push:
branches: [master]
paths:
- ".gitea/workflows/pocketbase-docker.yaml"
- "pocketbase.dockerfile"
env:
PB_VERSION: 0.25.0
jobs:
pocketbase-docker:
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Login to container registry
uses: docker/login-action@v3
with:
registry: gitea.vps.chriphost.de
username: ${{ secrets.CONTAINER_REGISTRY_USER }}
password: ${{ secrets.CONTAINER_REGISTRY_TOKEN }}
- name: Build Pocketbase Docker Image
run: docker build . --build-arg PB_VERSION=${{ PB_VERSION }} --file pocketbase.dockerfile --tag gitea.vps.chriphost.de/christoph/pocketbase:${{ PB_VERSION }}
- name: Push Pocketbase Docker Image
run: docker push gitea.vps.chriphost.de/christoph/pocketbase:${{ PB_VERSION }}

22
pocketbase.dockerfile Normal file
View File

@ -0,0 +1,22 @@
FROM docker.io/library/alpine:latest
ARG PB_VERSION=0.25.0
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"]