|
@@ -5,6 +5,7 @@ WORKDIR /app
|
|
|
COPY frontend/package.json ./
|
|
COPY frontend/package.json ./
|
|
|
RUN npm install --registry https://registry.npmmirror.com
|
|
RUN npm install --registry https://registry.npmmirror.com
|
|
|
COPY frontend/ .
|
|
COPY frontend/ .
|
|
|
|
|
+ENV VITE_API_BASE_URL=
|
|
|
RUN npm run build
|
|
RUN npm run build
|
|
|
|
|
|
|
|
# 阶段2: 构建管理后台前端
|
|
# 阶段2: 构建管理后台前端
|
|
@@ -13,6 +14,7 @@ WORKDIR /app
|
|
|
COPY admin-frontend/package.json ./
|
|
COPY admin-frontend/package.json ./
|
|
|
RUN npm install --registry https://registry.npmmirror.com
|
|
RUN npm install --registry https://registry.npmmirror.com
|
|
|
COPY admin-frontend/ .
|
|
COPY admin-frontend/ .
|
|
|
|
|
+ENV VITE_API_BASE_URL=
|
|
|
RUN npm run build
|
|
RUN npm run build
|
|
|
|
|
|
|
|
# 阶段3: Nginx 运行
|
|
# 阶段3: Nginx 运行
|