zyc f6d50055d1
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 1m39s
fix: 前端API地址按环境动态注入
- Dockerfile添加VITE_API_BASE_URL build arg
- dev环境构建时注入 airlabs-manage-api.test.airlabs.art
- master环境构建时注入 airlabs-manage-api.airlabs.art

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 16:18:01 +08:00

27 lines
458 B
Docker

# Build stage
FROM node:20-alpine AS build-stage
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
ARG VITE_API_BASE_URL=https://airlabs-manage-api.airlabs.art/api
ENV VITE_API_BASE_URL=${VITE_API_BASE_URL}
RUN npm run build
# Production stage
FROM nginx:stable-alpine AS production-stage
COPY --from=build-stage /app/dist /usr/share/nginx/html
COPY nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]