fix: panel init without werkzeug; stop tracking .env
Use stdlib pbkdf2 for admin passwords so init_db works reliably. Remove .env from git to avoid pull conflicts on VPS. Verify flask install before database init. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -140,7 +140,10 @@ nginx -t && systemctl enable nginx && systemctl restart nginx
|
||||
|
||||
log "安装 Python 面板依赖 ..."
|
||||
python3 -m venv "$ROOT_DIR/panel/venv"
|
||||
"$ROOT_DIR/panel/venv/bin/pip" install -q --upgrade pip
|
||||
"$ROOT_DIR/panel/venv/bin/pip" install -q -r "$ROOT_DIR/panel/requirements.txt"
|
||||
"$ROOT_DIR/panel/venv/bin/python" -c "import flask" \
|
||||
|| err "面板依赖安装失败,请检查网络后重试"
|
||||
|
||||
log "初始化节点数据库 ..."
|
||||
"$ROOT_DIR/panel/venv/bin/python" "$ROOT_DIR/panel/init_db.py"
|
||||
|
||||
Reference in New Issue
Block a user