mirror of
https://github.com/TeamWiseFlow/wiseflow.git
synced 2025-01-23 10:50:25 +08:00
36 lines
713 B
Docker
36 lines
713 B
Docker
FROM node:20-slim as builder
|
|
|
|
WORKDIR /app
|
|
|
|
COPY web ./
|
|
RUN npm install -g pnpm
|
|
RUN pnpm install
|
|
RUN pnpm build
|
|
|
|
|
|
FROM alpine:latest
|
|
|
|
ARG PB_VERSION=0.21.1
|
|
|
|
RUN apk add --no-cache unzip ca-certificates tzdata && \
|
|
ln -fs /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
|
|
|
|
|
|
# download and unzip PocketBase
|
|
ADD https://github.com/pocketbase/pocketbase/releases/download/v${PB_VERSION}/pocketbase_${PB_VERSION}_linux_amd64.zip /tmp/pb.zip
|
|
RUN unzip /tmp/pb.zip -d /pb/
|
|
|
|
RUN mkdir -p /pb
|
|
|
|
COPY ./pb/pb_migrations /pb/pb_migrations
|
|
COPY ./pb/pb_hooks /pb/pb_hooks
|
|
COPY --from=builder /app/dist /pb/pb_public
|
|
|
|
WORKDIR /pb
|
|
|
|
EXPOSE 8090
|
|
|
|
CMD tail -f /dev/null
|
|
|
|
# CMD ["/pb/pocketbase", "serve", "--http=0.0.0.0:8090"]
|