db867dcbe5
Deploy to Staging / deploy (push) Has been cancelled
Conflict detector / main (push) Has been cancelled
Lint Backend / lint-backend (push) Has been cancelled
Playwright Tests / changes (push) Has been cancelled
Test Backend / test-backend (push) Has been cancelled
Test Docker Compose / test-docker-compose (push) Has been cancelled
Playwright Tests / test-playwright (1, 4) (push) Has been cancelled
Playwright Tests / test-playwright (2, 4) (push) Has been cancelled
Playwright Tests / test-playwright (3, 4) (push) Has been cancelled
Playwright Tests / test-playwright (4, 4) (push) Has been cancelled
Playwright Tests / merge-playwright-reports (push) Has been cancelled
Playwright Tests / alls-green-playwright (push) Has been cancelled
Issue Manager / issue-manager (push) Has been cancelled
24 lines
520 B
Docker
24 lines
520 B
Docker
# 阶段 0, "build-stage", 基于 Node.js, 用于构建和编译前端
|
|
FROM node:24 AS build-stage
|
|
|
|
WORKDIR /app
|
|
|
|
COPY package*.json /app/
|
|
|
|
RUN npm install
|
|
|
|
COPY ./ /app/
|
|
|
|
ARG VITE_API_URL=${VITE_API_URL}
|
|
|
|
RUN npm run build
|
|
|
|
|
|
# 阶段 1, 基于 Nginx, 只包含已编译的应用, 可通过 Nginx 进行生产部署
|
|
FROM nginx:1
|
|
|
|
COPY --from=build-stage /app/dist/ /usr/share/nginx/html
|
|
|
|
COPY ./nginx.conf /etc/nginx/conf.d/default.conf
|
|
COPY ./nginx-backend-not-found.conf /etc/nginx/extra-conf.d/backend-not-found.conf
|