feat: AI 即时分析计费/共识/校准与 Docker 前端构建
- 即时分析:先扣费、防重入(429)、失败退款;记忆库与离线校准 worker - 多周期共识、客观分与设置项 AI_ANALYSIS_CONSENSUS_TIMEFRAMES - Docker:前端多阶段构建(QuantDinger-Vue-src)、根目录 .dockerignore、compose 调整 - 同步 frontend/dist 静态资源 Made-with: Cursor
This commit is contained in:
+26
-6
@@ -1,12 +1,32 @@
|
||||
# QuantDinger Frontend - Pre-built Static Files
|
||||
# No build step needed - dist/ is already compiled.
|
||||
# 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
|
||||
|
||||
# Copy pre-built frontend files
|
||||
COPY dist/ /usr/share/nginx/html/
|
||||
# curl: docker-compose healthcheck
|
||||
RUN apk add --no-cache curl
|
||||
|
||||
# Copy nginx configuration
|
||||
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
||||
COPY --from=builder /app/dist /usr/share/nginx/html/
|
||||
COPY frontend/nginx.conf /etc/nginx/conf.d/default.conf
|
||||
|
||||
EXPOSE 80
|
||||
|
||||
|
||||
Reference in New Issue
Block a user