Download deploy/Dockerfile.frontend from WWsCa/VetNet-LCPS: direct link, hf CLI and curl.
- Browser
- Download file 767 Bytes
-
https://huggingface.co/WWsCa/VetNet-LCPS/resolve/main/deploy/Dockerfile.frontend
- Command line
-
hf download hf://WWsCa/VetNet-LCPS/deploy/Dockerfile.frontend
-
curl -L -o Dockerfile.frontend https://huggingface.co/WWsCa/VetNet-LCPS/resolve/main/deploy/Dockerfile.frontend
767 Bytes
| # ================================================================ | |
| # VetCopilot 前端 Dockerfile(多阶段构建) | |
| # | |
| # 构建: docker build -f deploy/Dockerfile.frontend -t vetcopilot-frontend . | |
| # ================================================================ | |
| # ---- Stage 1: 构建 ---- | |
| FROM node:22-alpine AS builder | |
| WORKDIR /app | |
| COPY package.json package-lock.json* ./ | |
| RUN npm ci | |
| COPY . . | |
| # 构建参数:API 地址(Nginx 反向代理,同域 /api) | |
| ENV VITE_API_BASE=/api | |
| RUN npm run build | |
| # ---- Stage 2: 运行时(Nginx) ---- | |
| FROM nginx:alpine | |
| # 复制构建产物 | |
| COPY --from=builder /app/dist /usr/share/nginx/html | |
| # 复制 Nginx 配置 | |
| COPY nginx-site.conf /etc/nginx/conf.d/default.conf | |
| EXPOSE 80 | |
| CMD ["nginx", "-g", "daemon off;"] | |