♻️ Build on PocketBase defaults in container and tasks
This commit is contained in:
+6
-7
@@ -17,22 +17,21 @@ RUN go mod download
|
||||
COPY . .
|
||||
COPY --from=web-builder /app/web/build ./web/build
|
||||
|
||||
RUN go build -tags production -o wotra ./cmd/wotra
|
||||
RUN CGO_ENABLED=0 go build -trimpath -o /out/wotra .
|
||||
|
||||
# ── Stage 3: minimal runtime image ───────────────────────────────────────────
|
||||
FROM alpine:3.21
|
||||
|
||||
RUN adduser -D -u 1000 wotra
|
||||
RUN apk add --no-cache ca-certificates && adduser -D -u 1000 wotra
|
||||
|
||||
WORKDIR /data
|
||||
WORKDIR /pb_data
|
||||
USER wotra
|
||||
|
||||
COPY --from=go-builder /app/wotra /usr/local/bin/wotra
|
||||
COPY --from=go-builder /out/wotra /usr/local/bin/wotra
|
||||
|
||||
EXPOSE 8080
|
||||
|
||||
ENV PORT=8080 \
|
||||
DB_PATH=/data/wotra.db \
|
||||
TZ=UTC
|
||||
VOLUME /pb_data
|
||||
|
||||
ENTRYPOINT ["/usr/local/bin/wotra"]
|
||||
CMD ["serve", "--http=0.0.0.0:8080", "--dir=/pb_data"]
|
||||
|
||||
Reference in New Issue
Block a user