debug
This commit is contained in:
@@ -1,8 +1,21 @@
|
||||
# 17 domainCheck 全流程部署实操手册
|
||||
# 17 domainCheck 手工部署实操手册
|
||||
|
||||
## 一、文档目标
|
||||
|
||||
这份文档不是设计说明,也不是零散检查单,而是给实际部署时直接照着做的“全流程操作手册”。
|
||||
这份文档只讲一件事:
|
||||
|
||||
> 不依赖一键脚本,完全手工完成部署、更新、排障和扩容。
|
||||
|
||||
它不是设计说明,也不是零散检查单,而是给实际部署时直接照着做的“手工操作手册”。
|
||||
|
||||
文档边界:
|
||||
|
||||
- 这里只讲手工部署
|
||||
- 不使用 `install_overseas_quick.sh`
|
||||
- 不使用 `install_mainland_controller_quick.sh`
|
||||
- 不使用 `install_mainland_worker_quick.sh`
|
||||
- 如果你想走傻瓜式复制部署,请改看:
|
||||
- [18_domainCheck_CentOS9一键复制部署与更新文档.md](/www/wwwroot/getDomain/docs/18_domainCheck_CentOS9一键复制部署与更新文档.md:1)
|
||||
|
||||
适用场景:
|
||||
|
||||
@@ -181,7 +194,38 @@ python3.11 --version
|
||||
cd /opt/domaincheck/domainCheck
|
||||
python3.11 -m venv .venv
|
||||
source .venv/bin/activate
|
||||
pip install -r requirements.txt
|
||||
pip install --upgrade pip
|
||||
python3.11 - <<'PY'
|
||||
from pathlib import Path
|
||||
|
||||
source = Path("requirements.txt")
|
||||
target = Path("requirements.linux.txt")
|
||||
raw = source.read_bytes()
|
||||
for encoding in ("utf-8", "utf-16", "utf-16-le", "utf-16-be", "gbk"):
|
||||
try:
|
||||
text = raw.decode(encoding)
|
||||
break
|
||||
except UnicodeDecodeError:
|
||||
continue
|
||||
else:
|
||||
raise SystemExit("无法解析 requirements.txt 编码")
|
||||
|
||||
skip_prefixes = (
|
||||
"pywin32==",
|
||||
"pywin32-ctypes==",
|
||||
"twisted-iocpsupport==",
|
||||
"win32-setctime==",
|
||||
)
|
||||
lines = []
|
||||
for line in text.splitlines():
|
||||
normalized = line.strip().lstrip("\ufeff")
|
||||
if normalized.lower().startswith(skip_prefixes):
|
||||
continue
|
||||
lines.append(normalized)
|
||||
|
||||
target.write_text("\n".join(lines) + "\n", encoding="utf-8")
|
||||
PY
|
||||
pip install -r requirements.linux.txt
|
||||
```
|
||||
|
||||
然后补 API 依赖:
|
||||
@@ -191,6 +235,12 @@ cd /opt/domaincheck/domain-api
|
||||
/opt/domaincheck/domainCheck/.venv/bin/pip install fastapi uvicorn pydantic-settings psycopg2-binary redis openpyxl python-multipart
|
||||
```
|
||||
|
||||
补充说明:
|
||||
|
||||
- 这里不能直接在 Linux 上裸跑 `pip install -r requirements.txt`
|
||||
- 因为桌面版历史依赖里包含 `pywin32` 等 Windows-only 包
|
||||
- 手工部署时也必须先生成 `requirements.linux.txt` 再安装
|
||||
|
||||
### 3. 配置数据库和 Redis
|
||||
|
||||
确保 PostgreSQL 和 Redis 可用。
|
||||
|
||||
Reference in New Issue
Block a user