最后一版

This commit is contained in:
ZhuJW
2026-03-13 21:09:44 +08:00
parent 8584821f36
commit 265cb3a4e6
7 changed files with 244 additions and 183 deletions

View File

@@ -95,7 +95,24 @@ uvicorn main:app --reload --host 0.0.0.0 --port 8000
打开浏览器访问http://localhost:8000/static/index.html
### 方法二Docker 运行
### 方法二:使用 Docker Compose (推荐)
```bash
# 1. 配置环境变量
cp .env.example .env
# 编辑 .env 文件,填入你的 DashScope API Key
# 2. 启动服务
docker-compose up -d
# 3. 查看日志
docker-compose logs -f
# 4. 停止服务
docker-compose down
```
### 方法三:使用 Docker 构建
#### 1. 构建镜像
@@ -106,16 +123,34 @@ docker build -t sdlc-agent-demo .
#### 2. 运行容器
```bash
# 使用 docker-compose (推荐)
docker-compose up -d
# 或单独运行容器
docker run -d \
-p 8000:8000 \
-p 8080:8080 \
-e DASHSCOPE_API_KEY=your_api_key \
-v $(pwd)/logs:/app/logs \
--name sdlc-demo \
sdlc-agent-demo
```
#### 3. 访问服务
http://localhost:8000/static/index.html
- 前端界面:http://localhost:8080/static/index.html
- API 文档http://localhost:8080/docs
#### 4. 查看日志
```bash
docker logs -f sdlc-demo
```
#### 5. 停止服务
```bash
docker stop sdlc-demo && docker rm sdlc-demo
```
## 📡 API 接口