diff --git a/Dockerfile b/Dockerfile index cf6ec86..f2a1f0b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,12 +4,25 @@ ARG PB_VERSION=0.29.2 ARG TARGETARCH +# Set ARCH from TARGETARCH (default to amd64) +# Pocketbase uses "amd64" or "arm64" in their asset names +ARG ARCH +RUN if [ -z "$ARCH" ]; then \ + case "$TARGETARCH" in \ + amd64) export ARCH=amd64 ;; \ + arm64) export ARCH=arm64 ;; \ + arm) export ARCH=armv7 ;; \ + *) echo "Unsupported arch: $TARGETARCH" && exit 1 ;; \ + esac && \ + echo "Detected ARCH=$ARCH"; \ + fi + 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_${TARGETARCH}.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 diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 0000000..6b84d98 --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,7 @@ +The MIT License (MIT) Copyright (c) 2022 - present, Gani Georgiev + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/README.md b/README.md index d17bde8..4a27a4d 100644 --- a/README.md +++ b/README.md @@ -2,11 +2,19 @@ Unoffical Pocketbase Docker Container -This Repo sets up the Github Actions to build and deploy to Dockerhub the `azatecas/pocketbase` image. -I do not build pocketbase from scratch, but rather pull the official release from the original Pocketbase Repo and containarize it. - Support the original project: https://github.com/pocketbase/pocketbase + +This Repo sets up the Github Actions to build and deploy to Dockerhub the `azatecas/pocketbase` multiarch image. +It does not build pocketbase from scratch, but rather pull the official release from the original Pocketbase Repo and containarize it. + +Current pocketbase architecture supported by this repo: +- amd64 +- arm64 +- armv7 + +This image is being used in production, so we will do our best to build after each new Pocketbase release, although it may take a few days. + Suggested `docker-compose.yml` configuration ```yml @@ -29,3 +37,8 @@ services: timeout: 5s retries: 5 ``` + +`ENCRYPTION` - OPTIONAL is used to encrypt settings in the current pocketbase instance. +`COMMON_PATH` - refers to the root of the project. + +for more read the offical Pocketbase documentation: https://pocketbase.io/docs \ No newline at end of file