修改文件配置
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
# BMS 前端 Dockerfile(多阶段:Node 构建 → Nginx 托管)
|
||||
FROM node:18-alpine AS build
|
||||
WORKDIR /app
|
||||
COPY bms-front/package.json bms-front/package-lock.json ./
|
||||
RUN npm install
|
||||
COPY bms-front/ ./
|
||||
RUN npm run build:prod
|
||||
|
||||
FROM nginx:alpine
|
||||
# 前端 dist
|
||||
COPY --from=build /app/dist /usr/share/nginx/html
|
||||
# 自定义 nginx 配置(含 /prod-api 反代、history 回退)
|
||||
COPY deploy/nginx-front.conf /etc/nginx/conf.d/default.conf
|
||||
EXPOSE 80
|
||||
Reference in New Issue
Block a user