fix:优化试题内容和样式排版

This commit is contained in:
Daniel
2026-04-18 20:20:38 +08:00
parent 15e71a9231
commit 7cb9b89cb0
644 changed files with 152784 additions and 621 deletions

View File

@@ -1,5 +1,8 @@
# Docker Hub 官方镜像:请在本机 Docker 中配置「阿里云镜像加速器」后再构建/拉取
# (控制台:容器镜像服务 ACR → 镜像工具 → 镜像加速器,将地址写入 Docker Engine 的 registry-mirrors
# 构建参数默认走国内源;可在项目根 .env 中覆盖Compose 会自动加载 .env
# 基础镜像 postgres/nginx/python/node 仍从 Docker Hub 拉取,请在 Docker Desktop 配置 registry-mirrors见 scripts/configure-mirrors.sh
#
# backend 已默认清空 HTTP(S)_PROXY避免宿主机/IDE 代理注入容器导致访问 dashscope 失败;若必须走代理访问外网,请用
# docker-compose.override.yml 覆盖 HTTPX_TRUST_ENV=1 并设置代理变量(见 .env.example 说明)
services:
db:
image: postgres:16-alpine
@@ -20,8 +23,16 @@ services:
backend:
build:
context: ./backend
args:
PIP_INDEX_URL: ${PIP_INDEX_URL:-https://mirrors.aliyun.com/pypi/simple/}
PIP_TRUSTED_HOST: ${PIP_TRUSTED_HOST:-mirrors.aliyun.com}
DEBIAN_MIRROR_HOST: ${DEBIAN_MIRROR_HOST:-mirrors.aliyun.com}
container_name: exam-helper-backend
restart: unless-stopped
# 改善容器内解析 dashscope.aliyuncs.com若仍 ConnectError再检查宿主机网络/代理)
dns:
- 223.5.5.5
- 223.6.6.6
healthcheck:
test:
[
@@ -34,7 +45,7 @@ services:
timeout: 5s
retries: 12
start_period: 25s
# AI 相关变量优先从 .env.example 注入;若存在 .env 则覆盖同名项(见 Compose env_file 顺序
# 先加载 .env.example若存在 .env 则合并覆盖(推荐用 start.sh 或 scripts/bootstrap-env.sh 生成 .env
env_file:
- .env.example
- path: .env
@@ -44,17 +55,31 @@ services:
# 本地开发 Vite + Docker 前端均需允许
CORS_ORIGINS: http://localhost:5173,http://localhost:8173
UPLOAD_DIR: /app/uploads
# 覆盖 .env 中可能误带的代理,保证访问千问与 pip 行为解耦(千问用 httpx trust_env=false + 此处清空)
HTTPX_TRUST_ENV: "0"
HTTP_PROXY: ""
HTTPS_PROXY: ""
ALL_PROXY: ""
http_proxy: ""
https_proxy: ""
all_proxy: ""
NO_PROXY: "*"
volumes:
- uploads_data:/app/uploads
depends_on:
db:
condition: service_healthy
# 仅绑定本机回环;需手机/局域网访问可改为 "8866:8000"
ports:
- "127.0.0.1:8866:8000"
frontend:
build:
context: ./frontend
args:
NPM_REGISTRY: ${NPM_REGISTRY:-https://registry.npmmirror.com}
DEBIAN_MIRROR_HOST: ${DEBIAN_MIRROR_HOST:-mirrors.aliyun.com}
ALPINE_MIRROR_HOST: ${ALPINE_MIRROR_HOST:-mirrors.aliyun.com}
container_name: exam-helper-frontend
restart: unless-stopped
depends_on: