后端: 1. 登录注册补齐极验行为验证与跨域入口:gateway 新增 `/user/captcha/register`,登录/注册先做 GeeTest 初始化与二次校验,再进入 user/auth RPC;补充验证码失败/初始化失败/服务不可用响应码,并新增可配置 CORS middleware 适配分域部署。 2. 容器部署配置入口收口:`bootstrap.LoadConfig` 支持 `SMARTFLOW_CONFIG_FILE` 与环境变量覆盖,`config.example.yaml` / `config.docker.yaml` 补齐 geetest 与容器内服务地址,网关新增配置列表解析,便于 compose 场景直接挂载配置启动。 3. LLM outbox 与助手时间线稳定性修正:`cmd/llm` 显式绑定 llm 自身 topic/group,避免误入 agent consumer group;agent timeline 在 Redis 热缓存未落 MySQL 时改用 `seq` 兜底临时 id,避免前端历史回放撞 key。 前端: 4. 认证页接入极验并补齐提交前校验:新增 GeeTest 脚本加载与实例封装,登录/注册面板支持 challenge 初始化、切换面板重挂载、失败提示与提交前校验,认证 API/types 同步透传 geetest 三元组。 5. 前端部署基址与网关对接收口:Axios `baseURL`、Vue Router `history base` 与 Vite `base/dev proxy` 改为读取环境变量,新增 `frontend/.env.example`,支持子路径部署、容器内反向代理和本地联调共存。 6. 助手与工作台展示细节修正:AssistantPanel 历史重建优先使用真实 timeline id、缺失时退回 `seq` 保证消息主键唯一;首页主面板改为纵向可滚动并补底部留白,避免内容截断。 仓库: 7. 整站容器化交付链路补齐并重写说明文档:新增后端/前端 Dockerfile、`.dockerignore`、前端 Nginx 代理、`docker-compose.full.yml`、`.env.full.example` 与镜像打包/导入脚本,README 改写数据库/路由/部署章节,并新增 `docs/容器化部署说明.md` 说明离线镜像分发方案。
260 lines
5.2 KiB
YAML
260 lines
5.2 KiB
YAML
# SmartFlow 容器化部署配置模板。
|
||
#
|
||
# 说明:
|
||
# 1. 该文件面向 Docker Compose 内部网络,所有依赖地址都改为服务名。
|
||
# 2. 本地开发仍可继续使用 backend/config.yaml,不与该文件冲突。
|
||
# 3. 正式部署前请至少替换 JWT 密钥、模型密钥与外部服务凭证。
|
||
|
||
server:
|
||
port: 8080
|
||
|
||
database:
|
||
host: mysql
|
||
port: 3306
|
||
user: smartflow_user
|
||
password: "smartflow_password_456"
|
||
dbname: "smartflow"
|
||
|
||
jwt:
|
||
accessSecret: "change_me_access_secret"
|
||
refreshSecret: "change_me_refresh_secret"
|
||
accessTokenExpire: 15min
|
||
refreshTokenExpire: 7d
|
||
|
||
geetest:
|
||
captchaID: "80eb5b33de9fba62c69f5e57e36d9638"
|
||
privateKey: "991f9ad68191cbf6b823257ac67372f3"
|
||
|
||
redis:
|
||
host: redis
|
||
port: 6379
|
||
password: "redis_password_789"
|
||
|
||
userauth:
|
||
rpc:
|
||
listenOn: "0.0.0.0:9081"
|
||
endpoints:
|
||
- "userauth:9081"
|
||
timeout: 2s
|
||
|
||
taskclassforum:
|
||
rpc:
|
||
listenOn: "0.0.0.0:9090"
|
||
endpoints:
|
||
- "taskclassforum:9090"
|
||
timeout: 2s
|
||
|
||
tokenstore:
|
||
reward:
|
||
forumLikeAmount: 1
|
||
forumImportAmount: 5
|
||
rpc:
|
||
listenOn: "0.0.0.0:9095"
|
||
endpoints:
|
||
- "tokenstore:9095"
|
||
timeout: 2s
|
||
|
||
llm:
|
||
rpc:
|
||
listenOn: "0.0.0.0:9096"
|
||
endpoints:
|
||
- "llm:9096"
|
||
timeout: 0s
|
||
|
||
kafka:
|
||
enabled: true
|
||
brokers:
|
||
- "kafka:9092"
|
||
topic: "smartflow.agent.outbox"
|
||
groupID: "smartflow-agent-outbox-consumer"
|
||
retryScanInterval: 1s
|
||
retryBatchSize: 100
|
||
maxRetry: 20
|
||
|
||
outbox:
|
||
services:
|
||
agent:
|
||
topic: "smartflow.agent.outbox"
|
||
groupID: "smartflow-agent-outbox-consumer"
|
||
table: "agent_outbox_messages"
|
||
task:
|
||
topic: "smartflow.task.outbox"
|
||
groupID: "smartflow-task-outbox-consumer"
|
||
table: "task_outbox_messages"
|
||
memory:
|
||
topic: "smartflow.memory.outbox"
|
||
groupID: "smartflow-memory-outbox-consumer"
|
||
table: "memory_outbox_messages"
|
||
active-scheduler:
|
||
topic: "smartflow.active-scheduler.outbox"
|
||
groupID: "smartflow-active-scheduler-outbox-consumer"
|
||
table: "active_scheduler_outbox_messages"
|
||
notification:
|
||
topic: "smartflow.notification.outbox"
|
||
groupID: "smartflow-notification-outbox-consumer"
|
||
table: "notification_outbox_messages"
|
||
taskclass-forum:
|
||
topic: "smartflow.taskclass-forum.outbox"
|
||
groupID: "smartflow-taskclass-forum-outbox-consumer"
|
||
table: "taskclass_forum_outbox_messages"
|
||
llm:
|
||
topic: "smartflow.llm.outbox"
|
||
groupID: "smartflow-llm-outbox-consumer"
|
||
table: "llm_outbox_messages"
|
||
token-store:
|
||
topic: "smartflow.token-store.outbox"
|
||
groupID: "smartflow-token-store-outbox-consumer"
|
||
table: "token_store_outbox_messages"
|
||
|
||
notification:
|
||
rpc:
|
||
listenOn: "0.0.0.0:9082"
|
||
endpoints:
|
||
- "notification:9082"
|
||
timeout: 6s
|
||
frontendBaseURL: "https://smartflow.example.com"
|
||
retryScanEvery: 1m
|
||
retryBatchSize: 50
|
||
|
||
cors:
|
||
allowedOrigins:
|
||
- "http://localhost:5173"
|
||
- "https://smartflow.example.com"
|
||
|
||
schedule:
|
||
rpc:
|
||
listenOn: "0.0.0.0:9084"
|
||
endpoints:
|
||
- "schedule:9084"
|
||
timeout: 6s
|
||
|
||
task:
|
||
rpc:
|
||
listenOn: "0.0.0.0:9085"
|
||
endpoints:
|
||
- "task:9085"
|
||
timeout: 6s
|
||
|
||
taskClass:
|
||
rpc:
|
||
listenOn: "0.0.0.0:9086"
|
||
endpoints:
|
||
- "task-class:9086"
|
||
timeout: 6s
|
||
|
||
course:
|
||
rpc:
|
||
listenOn: "0.0.0.0:9087"
|
||
endpoints:
|
||
- "course:9087"
|
||
timeout: 5m
|
||
|
||
activeScheduler:
|
||
rpc:
|
||
listenOn: "0.0.0.0:9083"
|
||
endpoints:
|
||
- "active-scheduler:9083"
|
||
timeout: 8s
|
||
jobScanEvery: 1m
|
||
jobScanLimit: 50
|
||
|
||
time:
|
||
zone: "Asia/Shanghai"
|
||
semesterStartDate: "2026-03-02"
|
||
semesterEndDate: "2026-07-19"
|
||
|
||
agent:
|
||
rpc:
|
||
listenOn: "0.0.0.0:9089"
|
||
endpoints:
|
||
- "agent:9089"
|
||
timeout: 0s
|
||
chat:
|
||
enabled: true
|
||
api:
|
||
enabled: true
|
||
liteModel: "doubao-seed-2-0-code-preview-260215"
|
||
proModel: "doubao-seed-2-0-code-preview-260215"
|
||
maxModel: "doubao-seed-2-0-code-preview-260215"
|
||
baseURL: "https://ark.cn-beijing.volces.com/api/v3"
|
||
thinking:
|
||
plan: true
|
||
execute: true
|
||
deliver: false
|
||
memory: false
|
||
|
||
courseImport:
|
||
visionModel: ""
|
||
maxImageBytes: 5242880
|
||
maxTokens: 8192
|
||
|
||
rag:
|
||
enabled: true
|
||
store: "milvus"
|
||
topK: 8
|
||
threshold: 0.55
|
||
retrieve:
|
||
timeoutMs: 1500
|
||
ingest:
|
||
chunkSize: 400
|
||
chunkOverlap: 80
|
||
embed:
|
||
provider: "eino"
|
||
model: "doubao-embedding-vision-251215"
|
||
baseURL: "https://ark.cn-beijing.volces.com/api/v3"
|
||
timeoutMs: 1200
|
||
dimension: 1024
|
||
reranker:
|
||
enabled: false
|
||
provider: "noop"
|
||
timeoutMs: 1200
|
||
milvus:
|
||
address: "http://milvus-standalone:19530"
|
||
token: "root:Milvus"
|
||
dbName: ""
|
||
collectionName: "smartflow_rag_chunks"
|
||
metricType: "COSINE"
|
||
requestTimeoutMs: 1500
|
||
|
||
memory:
|
||
rpc:
|
||
listenOn: "0.0.0.0:9088"
|
||
endpoints:
|
||
- "memory:9088"
|
||
timeout: 6s
|
||
enabled: true
|
||
rag:
|
||
enabled: true
|
||
read:
|
||
mode: legacy
|
||
constraintLimit: 5
|
||
preferenceLimit: 5
|
||
factLimit: 5
|
||
inject:
|
||
renderMode: flat
|
||
prompt:
|
||
extract: ""
|
||
decision: ""
|
||
threshold: 0.55
|
||
enableReranker: false
|
||
llm:
|
||
temperature: 0.1
|
||
topP: 0.2
|
||
job:
|
||
maxRetry: 6
|
||
worker:
|
||
pollEvery: 2s
|
||
claimBatch: 1
|
||
decision:
|
||
enabled: true
|
||
candidateTopK: 5
|
||
candidateMinScore: 0.6
|
||
fallbackMode: legacy_add
|
||
write:
|
||
mode: legacy
|
||
minConfidence: 0.5
|
||
|
||
websearch:
|
||
provider: bocha
|
||
apiKey: ""
|