提交
This commit is contained in:
1 parent
195c89e6b7
commit
d294ecad84
34 files changed
+8466
-7867
No files matched your search
@@ -2,6 +2,31 @@
|
||||
ARG NODE_IMAGE=docker.m.daocloud.io/library/node:20-alpine
|
||||
ARG NGINX_IMAGE=docker.m.daocloud.io/library/nginx:1.27-alpine
|
||||
|
||||
# ---------- OA H5(mobile-oa-h5 → /oa-h5/)----------
|
||||
FROM ${NODE_IMAGE} AS oa-h5-builder
|
||||
|
||||
ARG NPM_REGISTRY=https://registry.npmmirror.com
|
||||
ARG NODE_MAX_OLD_SPACE_SIZE=4096
|
||||
ENV NODE_OPTIONS="--max-old-space-size=${NODE_MAX_OLD_SPACE_SIZE}"
|
||||
ENV HUSKY=0
|
||||
|
||||
RUN npm config set registry "${NPM_REGISTRY}" \
|
||||
&& npm config set fetch-retries 5 \
|
||||
&& npm config set fetch-retry-mintimeout 60000 \
|
||||
&& npm config set fetch-retry-maxtimeout 600000 \
|
||||
&& npm config set fetch-timeout 600000
|
||||
|
||||
WORKDIR /oa-h5
|
||||
|
||||
COPY mobile-oa-h5/package.json mobile-oa-h5/package-lock.json ./
|
||||
RUN --mount=type=cache,id=zkxw-oa-h5-npm,target=/root/.npm \
|
||||
npm ci --no-audit --no-fund
|
||||
|
||||
COPY mobile-oa-h5/ .
|
||||
# 同域 /api、/minio/zkxw + 生产服务号 AppID(见 .env.docker)
|
||||
RUN npm run build -- --mode docker
|
||||
|
||||
# ---------- Web Admin ----------
|
||||
FROM ${NODE_IMAGE} AS builder
|
||||
|
||||
ARG NPM_REGISTRY=https://registry.npmmirror.com
|
||||
@@ -44,6 +69,7 @@ FROM ${NGINX_IMAGE}
|
||||
|
||||
COPY deploy/docker/nginx/default.conf /etc/nginx/conf.d/default.conf
|
||||
COPY --from=builder /app/dist /usr/share/nginx/html
|
||||
COPY --from=oa-h5-builder /oa-h5/dist /usr/share/nginx/html/oa-h5
|
||||
|
||||
EXPOSE 80
|
||||
|
||||
|
||||
Reference in new issue
Block a user