This commit is contained in:
Your Name
2026-04-16 13:28:34 +08:00
parent 32efff1670
commit e406d73334
2 changed files with 56 additions and 9 deletions

View File

@@ -72,10 +72,34 @@
3. 上传 `domain-web`
4. 创建 Python 虚拟环境并安装依赖
5. 初始化或连接 PostgreSQL/Redis
6. 安装 `systemd` 服务
7. 启动 `domaincheck-api`
8. 启动 `domaincheck-worker`
9. 验证 Web 后台与运行中心
6. 先执行 `domainCheck/init_database.py` 初始化数据库结构
7. 安装 `systemd` 服务
8. 启动 `domaincheck-api`
9. 启动 `domaincheck-worker`
10. 验证 Web 后台与运行中心
### 数据库初始化
如果目标 PostgreSQL 是一套新库,必须先执行:
```bash
cd /opt/domaincheck/domainCheck
python3 init_database.py
```
执行完成后,建议至少确认这些表已存在:
- `domains`
- `detect_tasks`
- `domain_detections`
- `domain_blacklist`
- `sensitive_words`
如果未先初始化数据库,下面这些接口会因为 `UndefinedTable` 直接失败:
- `/api/v1/dashboard/overview`
- `/api/v1/detect/status`
- `/api/v1/imports/summary`
### 前端补充