Remove built-in proxy from deploy scripts and show pip install progress.
Proxy is optional via manual env vars only; update.sh also drops quiet pip/npm flags. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+6
-3
@@ -3,6 +3,8 @@ set -euo pipefail
|
||||
|
||||
INSTALL_DIR="${INSTALL_DIR:-/opt/secondary-school-grade-archive}"
|
||||
BRANCH="${BRANCH:-main}"
|
||||
PIP_MIRROR="${PIP_MIRROR:-https://pypi.tuna.tsinghua.edu.cn/simple}"
|
||||
NPM_REGISTRY="${NPM_REGISTRY:-https://registry.npmmirror.com}"
|
||||
|
||||
GREEN='\033[0;32m'
|
||||
NC='\033[0m'
|
||||
@@ -19,17 +21,18 @@ git pull origin "${BRANCH}"
|
||||
log_info "更新后端依赖…"
|
||||
cd backend
|
||||
source venv/bin/activate
|
||||
pip install -r requirements.txt -q
|
||||
pip install -r requirements.txt --progress-bar on -i "${PIP_MIRROR}"
|
||||
deactivate
|
||||
|
||||
log_info "重建前端…"
|
||||
cd ../frontend
|
||||
npm ci --silent
|
||||
npm config set registry "${NPM_REGISTRY}"
|
||||
npm ci
|
||||
npm run build
|
||||
|
||||
log_info "更新网关…"
|
||||
cd ../deploy/pm2
|
||||
npm ci --silent
|
||||
npm ci
|
||||
|
||||
log_info "重启 PM2…"
|
||||
cd "${INSTALL_DIR}"
|
||||
|
||||
Reference in New Issue
Block a user