Initial commit: 浼佷笟寰俊 AI 鏈哄櫒浜哄姪鐞?MVP
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
34
docs/stage1.md
Normal file
34
docs/stage1.md
Normal file
@@ -0,0 +1,34 @@
|
||||
# 阶段 1:Monorepo 骨架 + Docker Compose 本地可启动
|
||||
|
||||
## 目录结构
|
||||
|
||||
```
|
||||
backend/ # FastAPI,/api/health、/api/ready
|
||||
admin/ # Next.js + TS,/login、/dashboard 占位
|
||||
deploy/ # nginx.conf
|
||||
docs/ # 本文件等
|
||||
docker-compose.yml
|
||||
.env.example
|
||||
README.md
|
||||
```
|
||||
|
||||
## 本地启动
|
||||
|
||||
1. 复制环境变量:`cp .env.example .env`(PowerShell: `Copy-Item .env.example .env`)
|
||||
2. 启动:`docker compose up -d`
|
||||
3. 访问:http://localhost(nginx)、http://localhost:3000(admin 直连)、http://localhost:8000(backend 直连)
|
||||
|
||||
## 验证
|
||||
|
||||
- `GET http://localhost/api/health` → `{"status":"up","service":"backend"}`
|
||||
- `GET http://localhost/api/ready` → `{"ready":true,"service":"backend"}`
|
||||
- 打开 http://localhost → 重定向到 /login,可点「去 Dashboard」到 /dashboard
|
||||
|
||||
## 端口
|
||||
|
||||
| 服务 | 端口 |
|
||||
|--------|------|
|
||||
| nginx | 80 |
|
||||
| admin | 3000 |
|
||||
| backend| 8000 |
|
||||
| db | 5432 |
|
||||
Reference in New Issue
Block a user