docker-compose brings up PostgreSQL 16 with pgvector and Redis 7 on non-standard host ports so it never collides with an existing local database. scripts/smoke.sh is the proof: compose, migrate, boot the API, issue a token, call the real DeepSeek API and print the resulting ob_ai_call and bl_ledger rows. services/vision and services/matting are placeholders noting that the local RTX 5090 makes BiRefNet and RTMPose developable without cloud GPU.
864 B
Executable File
864 B
Executable File
scripts/
| 脚本 | 用途 |
|---|---|
smoke.sh |
端到端验证:compose up → migrate → 起 API → 发 dev token → 调 真实 DeepSeek → 打印 ob_ai_call 与 bl_ledger |
make smoke # 或 bash scripts/smoke.sh
注意
smoke.sh会真的调用 DeepSeek,产生真实费用。 这是仓库里唯一会花钱的 入口;make test全程离线。- 需要
.env里有可用的DEEPSEEK_API_KEY。 - 它在 8010 端口起一个临时 API 进程,结束时自动清理;日志留在
.smoke/api.log。
写新脚本的规矩
set -Eeuo pipefail,并且失败要给出可操作的错误信息,不要只是退出码。- 不要把密钥写进脚本或 echo 出来。从
.env/ 环境变量读。 - 任何会改数据或花钱的脚本,在文件头第一行注释里写清楚。