9473e50d59
- 即时分析:先扣费、防重入(429)、失败退款;记忆库与离线校准 worker - 多周期共识、客观分与设置项 AI_ANALYSIS_CONSENSUS_TIMEFRAMES - Docker:前端多阶段构建(QuantDinger-Vue-src)、根目录 .dockerignore、compose 调整 - 同步 frontend/dist 静态资源 Made-with: Cursor
34 lines
804 B
Docker
34 lines
804 B
Docker
# QuantDinger Frontend — multi-stage build
|
|
# Build context: repository root (see docker-compose.yml)
|
|
#
|
|
# Stage 1: compile Vue app from QuantDinger-Vue-src
|
|
# Stage 2: nginx static + API reverse proxy (nginx.conf)
|
|
|
|
FROM node:18-alpine AS builder
|
|
|
|
WORKDIR /app
|
|
|
|
# Layer cache: deps only
|
|
COPY QuantDinger-Vue-src/package.json QuantDinger-Vue-src/package-lock.json ./
|
|
RUN npm ci
|
|
|
|
COPY QuantDinger-Vue-src/ ./
|
|
|
|
# Match local production build (`npm run build` in QuantDinger-Vue-src)
|
|
ENV NODE_OPTIONS=--max_old_space_size=4096
|
|
RUN npm run build
|
|
|
|
# --- runtime ---
|
|
|
|
FROM nginx:1.25-alpine
|
|
|
|
# curl: docker-compose healthcheck
|
|
RUN apk add --no-cache curl
|
|
|
|
COPY --from=builder /app/dist /usr/share/nginx/html/
|
|
COPY frontend/nginx.conf /etc/nginx/conf.d/default.conf
|
|
|
|
EXPOSE 80
|
|
|
|
CMD ["nginx", "-g", "daemon off;"]
|