Merge branch 'main' of anton.github.com:velaboratory/VEL-Connect

dev
Anton Franzluebbers 2024-01-19 19:42:44 -05:00
commit 63ed7e264c
2 changed files with 19 additions and 17 deletions

View File

@ -1,20 +1,22 @@
# syntax=docker/dockerfile:1 FROM alpine:latest
FROM golang:1.18 as build
WORKDIR /src
COPY go.mod go.sum ./
RUN go mod download
COPY *.go ./ ARG PB_VERSION=0.20.7
COPY migrations/ ./migrations
# Build RUN apk add --no-cache \
RUN CGO_ENABLED=0 go build -ldflags="-s -w" -o ./velconnect unzip \
# RUN ./velconnect-pb migrate up ca-certificates
FROM alpine:3.18.2 # download and unzip PocketBase
COPY --from=build /src/velconnect /velconnect 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 # uncomment to copy the local pb_hooks dir into the image
ENTRYPOINT ["./velconnect", "serve", "--http=0.0.0.0:8090"] # COPY ./pb_hooks /pb/pb_hooks
EXPOSE 8092
# start PocketBase
CMD ["/pb/pocketbase", "serve", "--http=0.0.0.0:8092"]

View File

@ -4,6 +4,6 @@ services:
build: . build: .
restart: always restart: always
ports: ports:
- "8090:8090" - "8091:8092"
volumes: volumes:
- ./pb_data:/pb_data - ./pb_data:/pb/pb_data