♻️ Build on PocketBase defaults in container and tasks

This commit is contained in:
2026-11-30 17:39:27 +00:00
parent bb5ba06110
commit 74ebd2b38f
4 changed files with 32 additions and 19 deletions
+6 -7
View File
@@ -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"]