打分上传后台
All checks were successful
Deploy to Server / deploy (push) Successful in 16s

This commit is contained in:
jeremygan2021
2026-03-12 13:34:47 +08:00
parent 6129673ddc
commit 1f693e0e8a
15 changed files with 1692 additions and 4 deletions

54
backend/DEPLOY.md Normal file
View File

@@ -0,0 +1,54 @@
# 评委端系统部署说明
## 1. 系统概述
本系统为基于 Django 的后端渲染 HTML 评委端,提供评委登录、项目查看、打分点评、音频上传与 AI 服务管理功能。
## 2. 依赖环境
- Python 3.8+
- Django 3.2+
- Aliyun SDK (aliyun-python-sdk-core, aliyun-python-sdk-tingwu, oss2)
- requests
确保 `requirements.txt` 中包含以上依赖。
## 3. 环境变量
系统依赖以下环境变量(在 `backend/config/settings.py``.env` 文件中配置):
```bash
# 数据库配置
DB_NAME=your_db_name
DB_USER=your_db_user
DB_PASSWORD=your_db_password
DB_HOST=your_db_host
DB_PORT=5432
# 阿里云配置 (用于音频上传与 AI 服务)
ALIYUN_ACCESS_KEY_ID=your_access_key_id
ALIYUN_ACCESS_KEY_SECRET=your_access_key_secret
ALIYUN_OSS_BUCKET_NAME=your_bucket_name
ALIYUN_OSS_ENDPOINT=oss-cn-shanghai.aliyuncs.com
ALIYUN_TINGWU_APP_KEY=your_tingwu_app_key
```
## 4. 启动脚本
使用提供的 `start_judge_system.sh` 启动服务。
```bash
chmod +x start_judge_system.sh
./start_judge_system.sh
```
该脚本将执行数据库迁移并启动 Django 开发服务器。生产环境建议使用 Gunicorn + Nginx。
## 5. 访问地址
- 评委端入口: `http://localhost:8000/competition/admin/` (自动跳转至登录或仪表盘)
- 评委端主页: `http://localhost:8000/judge/dashboard/`
- AI 管理页: `http://localhost:8000/judge/ai/manage/`
## 6. 审计日志
所有关键操作(登录、打分、上传、删除)均记录在项目根目录下的 `judge_audit.log` 文件中。格式如下:
`[YYYY-MM-DD HH:MM:SS] IP:127.0.0.1 | Phone:13800000000 | Action:LOGIN | Target:System | Result:SUCCESS | Details:...`
## 7. 注意事项
- 登录需使用已在后台绑定且角色为“评委”的手机号。
- 验证码在开发模式下通过控制台输出,或使用默认测试码 `8888`