From 0cf637d43efe218716a339cdf7a7783a5fa17474 Mon Sep 17 00:00:00 2001 From: LPM Date: Mon, 11 Aug 2025 22:03:32 -0400 Subject: [PATCH 1/6] Update docker-compose.yml removed docker-compose.yml build command --- docker-compose.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index e5b6679..232e806 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,10 +1,7 @@ services: pocketbase: container_name: pocketbase - build: - context: . - dockerfile: Dockerfile - image: codefallacy-pocketbase + image: azatecas/pocketbase restart: unless-stopped environment: ENCRYPTION: ${ENCRYPTION} # optional (Ensure this is a 32-character long encryption key https://pocketbase.io/docs/going-to-production/#enable-settings-encryption) From 11a15022376ab988a6dd3b9809c9f351f025eb9f Mon Sep 17 00:00:00 2001 From: LPM Date: Mon, 11 Aug 2025 22:41:59 -0400 Subject: [PATCH 2/6] Update Dockerfile changed to arch arg --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 0c9bc8e..a17ef8c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,13 +1,14 @@ FROM alpine:latest ARG PB_VERSION=0.29.2 +ARG ARCH=amd64 RUN apk add --no-cache \ unzip \ ca-certificates # download and unzip PocketBase x86 64-bit -ADD https://github.com/pocketbase/pocketbase/releases/download/v${PB_VERSION}/pocketbase_${PB_VERSION}_linux_amd64.zip /tmp/pb.zip +ADD https://github.com/pocketbase/pocketbase/releases/download/v${PB_VERSION}/pocketbase_${PB_VERSION}_linux_${ARCH}.zip /tmp/pb.zip RUN unzip /tmp/pb.zip -d /pb/ # uncomment to copy the local pb_migrations dir into the image From fee83c074bce94cb026f647c9e649a51dc9ce00d Mon Sep 17 00:00:00 2001 From: LPM Date: Mon, 11 Aug 2025 22:48:04 -0400 Subject: [PATCH 3/6] added variables --- .github/workflows/build-pocketbase.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-pocketbase.yml b/.github/workflows/build-pocketbase.yml index f9e2ce2..170d934 100644 --- a/.github/workflows/build-pocketbase.yml +++ b/.github/workflows/build-pocketbase.yml @@ -28,7 +28,7 @@ jobs: images: docker.io/${{ vars.DOCKERHUB_USERNAME }}/pocketbase tags: | type=raw,value=latest - type=raw,value=build-${{ github.run_number }} + type=raw.value=${{ PB_VERSION }} - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 @@ -39,3 +39,6 @@ jobs: tags: ${{ steps.meta.outputs.tags }} platforms: linux/amd64 push: true + build-args: | + ARCH=${{ vars.AMD64 }} + PB_VERSION=${{ vars.PB_VERSION }} From 96e944dc07e205841a9ab349349c68250140b30d Mon Sep 17 00:00:00 2001 From: LPM Date: Mon, 11 Aug 2025 22:49:00 -0400 Subject: [PATCH 4/6] changed workflow name --- .../{build-pocketbase.yml => build-pocketbase-amd64.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{build-pocketbase.yml => build-pocketbase-amd64.yml} (100%) diff --git a/.github/workflows/build-pocketbase.yml b/.github/workflows/build-pocketbase-amd64.yml similarity index 100% rename from .github/workflows/build-pocketbase.yml rename to .github/workflows/build-pocketbase-amd64.yml From 70b192f17c3de70345e69c5f3dc8a61f11ee66eb Mon Sep 17 00:00:00 2001 From: LPM Date: Mon, 11 Aug 2025 22:58:54 -0400 Subject: [PATCH 5/6] added arm workflow --- .github/workflows/build-pocketbase-arm64.yml | 44 ++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .github/workflows/build-pocketbase-arm64.yml diff --git a/.github/workflows/build-pocketbase-arm64.yml b/.github/workflows/build-pocketbase-arm64.yml new file mode 100644 index 0000000..a4da721 --- /dev/null +++ b/.github/workflows/build-pocketbase-arm64.yml @@ -0,0 +1,44 @@ +name: Build Pocketbase +on: + pull_request: + branches: + - production + types: + - closed +jobs: + if_merged: + if: github.event.pull_request.merged == true + name: Build Pocketbase and Push + runs-on: ubuntu-latest + steps: + - + name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ vars.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - + name: Set up QEMU + uses: docker/setup-qemu-action@v3 + - + name: Container Metadata + uses: docker/metadata-action@v5 + id: meta + with: + images: docker.io/${{ vars.DOCKERHUB_USERNAME }}/pocketbase + tags: | + type=raw,value=latest + type=raw.value=${{ PB_VERSION }} + - + name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - + name: Build and Push + uses: docker/build-push-action@v6 + with: + tags: ${{ steps.meta.outputs.tags }} + platforms: linux/arm64 + push: true + build-args: | + ARCH=${{ vars.ARM64 }} + PB_VERSION=${{ vars.PB_VERSION }} From 465c053c1cba64d79bfd9b27f1f14811697e1abb Mon Sep 17 00:00:00 2001 From: LPM Date: Mon, 11 Aug 2025 23:03:50 -0400 Subject: [PATCH 6/6] updated runner --- .github/workflows/build-pocketbase-arm64.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-pocketbase-arm64.yml b/.github/workflows/build-pocketbase-arm64.yml index a4da721..2628caa 100644 --- a/.github/workflows/build-pocketbase-arm64.yml +++ b/.github/workflows/build-pocketbase-arm64.yml @@ -9,7 +9,7 @@ jobs: if_merged: if: github.event.pull_request.merged == true name: Build Pocketbase and Push - runs-on: ubuntu-latest + runs-on: ubuntu-24.04-arm steps: - name: Login to Docker Hub