feat: Linux one-click start pulls from Gitea ai_site

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
whm
2026-07-31 10:20:46 +08:00
parent 6366859bb3
commit 3d2851a1f1
5 changed files with 86 additions and 14 deletions

View File

@@ -1,7 +1,11 @@
#!/usr/bin/env bash
# AI 建站 — 拉取代码并重启
# 用法:./pull-and-restart.sh
# 环境变量GIT_BRANCH默认 master、FORCE_GIT_RESET默认 1与远程硬对齐
# 默认仓库https://gitea.yuxindazhineng.com/whm/ai_site.git
# 环境变量:
# AIJZ_GIT_URL 覆盖仓库地址
# GIT_BRANCH 分支(默认 main
# FORCE_GIT_RESET 默认 1与远程硬对齐
set -euo pipefail
ROOT="$(cd "$(dirname "$0")" && pwd)"
cd "$ROOT"
@@ -11,10 +15,12 @@ cd "$ROOT"
echo "========================================"
echo " AI 建站 拉取并重启"
echo " 路径: $ROOT"
echo " 仓库: ${AIJZ_GIT_URL:-https://gitea.yuxindazhineng.com/whm/ai_site.git}"
echo " 分支: ${GIT_BRANCH:-main}"
echo "========================================"
ensure_docker
git_pull_hard || true
git_pull_hard
stack_down
sleep 1
stack_up 1