24 lines
911 B
Docker
24 lines
911 B
Docker
# InkReach Admin (v2) - Vite build served by nginx
|
||
# v2 部署本地化:与现网共用 official.inkreach.cc,SPA 路径挂 /v2/admin/ 下
|
||
FROM node:20-alpine AS build
|
||
WORKDIR /app
|
||
RUN corepack enable
|
||
ENV NPM_CONFIG_REGISTRY=https://registry.npmmirror.com COREPACK_NPM_REGISTRY=https://registry.npmmirror.com
|
||
|
||
ARG VITE_API_BASE=/api
|
||
ENV VITE_API_BASE=$VITE_API_BASE
|
||
|
||
COPY package.json pnpm-lock.yaml pnpm-workspace.yaml turbo.json ./
|
||
COPY apps/admin/package.json apps/admin/
|
||
RUN pnpm install --filter @inkreach/admin --frozen-lockfile
|
||
|
||
COPY apps/admin apps/admin
|
||
# vue-tsc full check is skipped: pre-existing type errors unrelated to the build output
|
||
RUN pnpm --filter @inkreach/admin exec vite build
|
||
|
||
FROM nginx:1.27-alpine
|
||
COPY --from=build /app/apps/admin/dist /usr/share/nginx/html/v2/admin
|
||
COPY deploy/nginx/admin.conf /etc/nginx/conf.d/default.conf
|
||
COPY deploy/h5 /usr/share/nginx/html/v2/h5
|
||
EXPOSE 80
|