diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 3ab30b8..48b62e5 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -23,8 +23,5 @@ jobs: - name: Build and Push run: | - docker build -t botwayorg/pb-core:latest --file Dockerfile.core . - docker push botwayorg/pb-core:latest - docker build -t botwayorg/pocketbase:latest . docker push botwayorg/pocketbase:latest diff --git a/Dockerfile b/Dockerfile index 059c1a2..6253477 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,16 +1,19 @@ -FROM botwayorg/pb-core:latest AS download -FROM alpine:latest +FROM alpine:latest as download + +RUN apk add curl -ENV PKGS="git git-lfs npm build-base ca-certificates" -ENV CMD="/usr/local/bin/pocketbase serve --http=0.0.0.0:8090 --dir=/root/pocketbase" -ENV SG_DIR="/root/pocketbase" +RUN curl -s https://get-latest.deno.dev/pocketbase/pocketbase?no-v=true >> tag.txt -ARG GITHUB_TOKEN +RUN wget https://github.com/pocketbase/pocketbase/releases/download/v$(cat tag.txt)/pocketbase_$(cat tag.txt)_linux_amd64.zip \ + && unzip pocketbase_$(cat tag.txt)_linux_amd64.zip \ + && chmod +x /pocketbase + +FROM alpine:latest -RUN apk update && apk add --update $PKGS && rm -rf /var/cache/apk/* && npm i -g npm@latest @botway/strg@latest +RUN apk update && apk add --update git build-base ca-certificates && rm -rf /var/cache/apk/* COPY --from=download /pocketbase /usr/local/bin/pocketbase EXPOSE 8090 -ENTRYPOINT strg --check && strg --sync +ENTRYPOINT /usr/local/bin/pocketbase serve --http=0.0.0.0:8090 --dir=/root/pocketbase diff --git a/Dockerfile.core b/Dockerfile.core deleted file mode 100644 index c2ab1b6..0000000 --- a/Dockerfile.core +++ /dev/null @@ -1,9 +0,0 @@ -FROM alpine:latest as download - -RUN apk add curl - -RUN curl -s https://get-latest.deno.dev/pocketbase/pocketbase?no-v=true >> tag.txt - -RUN wget https://github.com/pocketbase/pocketbase/releases/download/v$(cat tag.txt)/pocketbase_$(cat tag.txt)_linux_amd64.zip \ - && unzip pocketbase_$(cat tag.txt)_linux_amd64.zip \ - && chmod +x /pocketbase