1.0.1 初始化铜壶管理系统项目并配置容器化

This commit is contained in:
Hongying Li
2026-04-12 18:28:37 +08:00
parent 72239c24fd
commit 5dd16d9809
129 changed files with 15165 additions and 0 deletions

18
frontend/Dockerfile Normal file
View File

@@ -0,0 +1,18 @@
FROM node:18-alpine AS builder
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
# NAS部署非常关键的一步由于走Nginx同域反代需将URL置空以使用相对路径避免局域网IP锁死
ENV VITE_API_BASE_URL=""
RUN npm run build
FROM nginx:alpine
# 获取vite构件结果
COPY --from=builder /app/dist /usr/share/nginx/html
# 覆盖Nginx默认配置
COPY nginx.conf /etc/nginx/conf.d/default.conf
# 暴露的Web服务器访问端口
EXPOSE 80