Archive the differentiated YuXinGu product docs, AI engineering system, design contract, and Go/Vue scaffold. Next execution prioritizes Cece-parity over early innovation (see .ai/product/STRATEGY.md). Co-authored-by: Cursor <cursoragent@cursor.com>
30 lines
623 B
Markdown
30 lines
623 B
Markdown
# 09 Docker / CI/CD 规范
|
||
|
||
## 本地
|
||
|
||
```bash
|
||
docker compose -f deploy/docker-compose.yml up -d
|
||
```
|
||
|
||
服务:`postgres`(必备)、可选 `api` 镜像。
|
||
|
||
## 环境变量
|
||
|
||
- `APP_ENV`:`dev` | `staging` | `prod`
|
||
- `DATABASE_URL`
|
||
- `HTTP_ADDR`(默认 `:8080`)
|
||
- `JWT_SECRET` / 支付密钥等仅环境注入
|
||
|
||
禁止把 `.env` 提交进 git(示例用 `.env.example`)。
|
||
|
||
## CI 门禁(目标)
|
||
|
||
1. `go test ./...`(api)
|
||
2. `npm run build`(user-h5)
|
||
3. lint(后置可加 golangci-lint / eslint)
|
||
|
||
## 镜像
|
||
|
||
- API 多阶段构建,最终镜像仅含二进制。
|
||
- 标签:`yuxingu-api:<git-sha>`。
|