文件
csp/docker-compose.yml
cryptocommuniums-afk 7860414ae5 feat: auto LLM feedback runner + problem link + 5xx retry
- Add SubmissionFeedbackRunner: async background queue for auto LLM feedback
- Enqueue feedback generation after each submission in submitProblem()
- Register runner in main.cc with CSP_FEEDBACK_AUTO_RUN env var
- Add problem_title to GET /api/v1/submissions/{id} response
- Frontend: clickable problem link on submission detail page
- Enhance LLM prompt with richer analysis dimensions
- Add 5xx/connection error retry (max 5 attempts) in Python LLM script

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-16 15:13:35 +08:00

58 行
1.8 KiB
YAML

此文件含有模棱两可的 Unicode 字符
此文件含有可能会与其他字符混淆的 Unicode 字符。 如果您是想特意这样的,可以安全地忽略该警告。 使用 Escape 按钮显示他们。
services:
backend:
env_file:
- .env
environment:
- OI_IMPORT_AUTO_RUN=true
- OI_IMPORT_AUTO_MODE=luogu
- OI_IMPORT_WORKERS=3
- OI_IMPORT_SCRIPT_PATH=/app/scripts/import_luogu_csp.py
- OI_IMPORT_LOCAL_RAG_SCRIPT_PATH=/app/scripts/import_local_pdf_rag.py
- OI_LOCAL_PDF_DIR=/data/local_pdfs
- OI_IMPORT_TARGET_TOTAL=5000
- OI_IMPORT_RESUME_ON_RESTART=true
- OI_IMPORT_CLEAR_ALL_PROBLEMS=false
- OI_IMPORT_CLEAR_EXISTING=false
- "OI_IMPORT_CLEAR_SOURCE_PREFIX=luogu:"
- CSP_GEN_AUTO_RUN=true
- CSP_GEN_COUNT=1
- CSP_GEN_WAIT_FOR_IMPORT=true
- CSP_GEN_SCRIPT_PATH=/app/scripts/generate_cspj_problem_rag.py
- CSP_SOLUTION_SCRIPT_PATH=/app/scripts/generate_problem_solutions.py
- CSP_SOLUTION_AUTO_RUN_MISSING=true
- CSP_SOLUTION_AUTO_LIMIT=50000
- CSP_SOLUTION_AUTO_MAX_SOLUTIONS=3
- CSP_FEEDBACK_AUTO_RUN=true
- CSP_FEEDBACK_AUTO_LIMIT=500
- CSP_FEEDBACK_SCRIPT_PATH=/app/scripts/analyze_submission_feedback.py
build:
context: .
dockerfile: Dockerfile.backend
# 如需直连后端调试,可打开端口映射;默认仅通过前端反代访问
# ports:
# - "8080:8080"
volumes:
- csp_data:/data
- ./data/local_pdfs:/data/local_pdfs
restart: unless-stopped
frontend:
env_file:
- .env
build:
context: .
dockerfile: Dockerfile.frontend
environment:
# 浏览器侧通过同域路径前缀访问后端Next.js反代到backend
- NEXT_PUBLIC_API_BASE=/admin139
# Next.js 服务端反代用(可选),仅在你把 NEXT_PUBLIC_API_BASE 设为 /api 时需要
- BACKEND_INTERNAL_URL=http://backend:8080
ports:
- "7888:3000"
depends_on:
- backend
restart: unless-stopped
volumes:
csp_data: