feat: add Docker deployment (backend:18889, frontend:18888)

- Dockerfile.backend: Python 3.11 + FastAPI + uvicorn
- Dockerfile.frontend: Node 20 build + Nginx serve
- docker-compose.yml: orchestration with data volume mount
- nginx.conf: API/WebSocket proxy to backend
- web/backend/requirements.txt: Python dependencies
- .dockerignore: exclude venv/node_modules/data from build

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-05-13 22:36:52 +08:00
parent 0c28031e81
commit 5e69e5a841
8 changed files with 178 additions and 0 deletions
+23
View File
@@ -57,6 +57,29 @@ cd web && python -m uvicorn backend.main:app --host 0.0.0.0 --port 8000
**默认账号:** `admin` / `admin123`(首次登录后建议修改密码)
### Docker 部署
```bash
# 构建并启动
docker-compose up -d --build
# 访问
# 前端: http://服务器IP:18888
# 后端 API: http://服务器IP:18889
# 查看日志
docker-compose logs -f
# 停止
docker-compose down
```
**端口说明:**
- `18888` — 前端 (Nginx)
- `18889` — 后端 API (FastAPI)
**数据持久化:** `data/` 目录挂载到宿主机,数据库和上传文件不会丢失。
## 项目结构
```