fix: run init_db with panel venv python

Use venv interpreter so werkzeug is available; sync admin user from .env on init.
Set default panel username to dekun.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-06-16 09:14:12 +08:00
parent bccf6cfdce
commit 042ae5a422
4 changed files with 10 additions and 10 deletions
+1 -1
View File
@@ -143,7 +143,7 @@ python3 -m venv "$ROOT_DIR/panel/venv"
"$ROOT_DIR/panel/venv/bin/pip" install -q -r "$ROOT_DIR/panel/requirements.txt"
log "初始化节点数据库 ..."
python3 "$ROOT_DIR/panel/init_db.py"
"$ROOT_DIR/panel/venv/bin/python" "$ROOT_DIR/panel/init_db.py"
log "生成 sing-box 服务端配置 ..."
python3 "$ROOT_DIR/scripts/render-server.py"