Files
3d_test/nginx.conf
2026-05-18 19:21:46 +08:00

20 lines
658 B
Nginx Configuration File
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# ================= Dockerfile (前端 Nginx 构建) =================
FROM node:14-alpine AS builder
WORKDIR /app
COPY package*.json ./
RUN npm install --registry=https://registry.npmmirror.com
COPY . .
RUN npm run build
# ================= 生产镜像 =================
FROM nginx:alpine
# Nginx 配置
COPY nginx.conf /etc/nginx/conf.d/default.conf
# 复制构建产物vue.config.js 中 outputDir: '数字园区项目'
COPY --from=builder /app/数字园区项目 /usr/share/nginx/html
EXPOSE 80
FROM nginx:alpine
COPY nginx.conf /etc/nginx/conf.d/default.conf
# vue.config.js outputDir = '数字园区项目'
COPY E:\project\web\vue\园区项目\