Files
meida_backend/scripts/README.md
T
xsl 8a4720472b build: local stack, container images and the end-to-end smoke script
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.
2026-08-14 00:26:39 +08:00

23 lines
864 B
Markdown
Executable File

# `scripts/`
| 脚本 | 用途 |
| --- | --- |
| `smoke.sh` | 端到端验证:compose up → migrate → 起 API → 发 dev token → 调 **真实 DeepSeek** → 打印 `ob_ai_call` 与 `bl_ledger` |
```bash
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` / 环境变量读。
- 任何会改数据或花钱的脚本,在文件头第一行注释里写清楚。