txw/devops/web/Dockerfile
2026-05-03 17:49:17 +08:00

24 lines
842 B
Docker

## ============================================================
## 碳信网 - 前端镜像
## 前提:本地先执行 npm run build 构建前端
## 构建:
## cd txw-mhzc-web && npm install && npm run build
## cd txw-yygl-web && npm install && npm run build
## ============================================================
FROM nginx:alpine
# 复制 nginx 配置
COPY devops/web/nginx.conf /etc/nginx/nginx.conf
COPY devops/web/default.json /etc/nginx/oem/default.json
COPY devops/web/baidu_verify_codeva-5rH3psCeMQ.html /etc/nginx/verify/baidu_verify_codeva-5rH3psCeMQ.html
COPY devops/web/proxy-common.conf /etc/nginx/proxy-common.conf
# 复制预构建的前端产物
COPY txw-mhzc-web/dist /usr/share/nginx/html/txw-mhzc-web
COPY txw-yygl-web/dist /usr/share/nginx/html/txw-yygl-web
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]