2026-04-24 10:42:11 +08:00
|
|
|
FROM node:22-alpine AS build
|
|
|
|
|
WORKDIR /workspace
|
|
|
|
|
|
|
|
|
|
COPY package.json ./package.json
|
|
|
|
|
COPY yarn.lock ./yarn.lock
|
|
|
|
|
COPY tenant-platform ./tenant-platform
|
|
|
|
|
COPY ops-platform ./ops-platform
|
2026-04-24 15:35:24 +08:00
|
|
|
COPY docs-site ./docs-site
|
2026-04-24 10:42:11 +08:00
|
|
|
|
|
|
|
|
RUN yarn install --frozen-lockfile
|
|
|
|
|
|
|
|
|
|
ARG TENANT_APP_BASE=/
|
|
|
|
|
ARG OPS_APP_BASE=/ops/
|
|
|
|
|
ARG TENANT_API_BASE_URL=/api
|
|
|
|
|
ARG OPS_API_BASE_URL=/api
|
|
|
|
|
|
|
|
|
|
RUN cd tenant-platform && \
|
|
|
|
|
VITE_APP_BASE=${TENANT_APP_BASE} VITE_API_BASE_URL=${TENANT_API_BASE_URL} yarn build
|
|
|
|
|
|
|
|
|
|
RUN cd ops-platform && \
|
|
|
|
|
VITE_APP_BASE=${OPS_APP_BASE} VITE_API_BASE_URL=${OPS_API_BASE_URL} yarn build
|
|
|
|
|
|
2026-04-24 15:35:24 +08:00
|
|
|
RUN cd docs-site && yarn build
|
|
|
|
|
|
2026-04-24 10:42:11 +08:00
|
|
|
FROM nginx:1.27-alpine
|
|
|
|
|
COPY nginx/default.conf /etc/nginx/conf.d/default.conf
|
|
|
|
|
COPY --from=build /workspace/tenant-platform/dist /usr/share/nginx/html/tenant
|
|
|
|
|
COPY --from=build /workspace/ops-platform/dist /usr/share/nginx/html/ops
|
2026-04-24 15:35:24 +08:00
|
|
|
COPY --from=build /workspace/docs-site/docs/.vitepress/dist /usr/share/nginx/html/docs
|