From 7552e937d6f3eb260cc5bf9c6c2979cfb9c57134 Mon Sep 17 00:00:00 2001 From: Oracle Server Date: Sat, 20 Jan 2024 00:25:11 +0000 Subject: [PATCH] updated to pocketbase 0.20.7 --- velconnect/Dockerfile | 32 +++++++++++++++++--------------- velconnect/docker-compose.yml | 4 ++-- 2 files changed, 19 insertions(+), 17 deletions(-) diff --git a/velconnect/Dockerfile b/velconnect/Dockerfile index 6f973fc..45b4f58 100644 --- a/velconnect/Dockerfile +++ b/velconnect/Dockerfile @@ -1,20 +1,22 @@ -# syntax=docker/dockerfile:1 -FROM golang:1.18 as build -WORKDIR /src -COPY go.mod go.sum ./ -RUN go mod download +FROM alpine:latest -COPY *.go ./ -COPY migrations/ ./migrations +ARG PB_VERSION=0.20.7 -# Build -RUN CGO_ENABLED=0 go build -ldflags="-s -w" -o ./velconnect -# RUN ./velconnect-pb migrate up +RUN apk add --no-cache \ + unzip \ + ca-certificates -FROM alpine:3.18.2 -COPY --from=build /src/velconnect /velconnect +# download and unzip PocketBase +ADD https://github.com/pocketbase/pocketbase/releases/download/v${PB_VERSION}/pocketbase_${PB_VERSION}_linux_arm64.zip /tmp/pb.zip +RUN unzip /tmp/pb.zip -d /pb/ -EXPOSE 8090 +# uncomment to copy the local pb_migrations dir into the image +# COPY ./pb_migrations /pb/pb_migrations -# Run -ENTRYPOINT ["./velconnect", "serve", "--http=0.0.0.0:8090"] \ No newline at end of file +# uncomment to copy the local pb_hooks dir into the image +# COPY ./pb_hooks /pb/pb_hooks + +EXPOSE 8092 + +# start PocketBase +CMD ["/pb/pocketbase", "serve", "--http=0.0.0.0:8092"] diff --git a/velconnect/docker-compose.yml b/velconnect/docker-compose.yml index 0b756d9..6f4a660 100644 --- a/velconnect/docker-compose.yml +++ b/velconnect/docker-compose.yml @@ -4,6 +4,6 @@ services: build: . restart: always ports: - - "8090:8090" + - "8091:8092" volumes: - - ./pb_data:/pb_data + - ./pb_data:/pb/pb_data