最初版本

This commit is contained in:
sa19840531
2026-08-15 14:51:51 +08:00
parent 4e01df4dce
commit ea47ea4449
176 changed files with 21009 additions and 0 deletions
+38
View File
@@ -0,0 +1,38 @@
#!/bin/bash
set -euo pipefail
# test.pubuli.com:7788 一键部署 guest-chat
# 用法:在服务器上 git clone / 上传 guest-cs-stack 后执行
# chmod +x deploy-test.sh && ./deploy-test.sh
COMPOSE="docker compose -f docker-compose.chat.yaml -f docker-compose.chat.test.yaml"
echo "[1/5] 停止占用 7788 的旧进程(Werkzeug / 旧 Flask)..."
if command -v fuser >/dev/null 2>&1; then
fuser -k 7788/tcp 2>/dev/null || true
fi
pkill -f "python.*7788" 2>/dev/null || true
pkill -f "flask run.*7788" 2>/dev/null || true
pkill -f "gunicorn.*7788" 2>/dev/null || true
sleep 2
echo "[2/5] 拉取最新镜像..."
docker pull ladioussuapp/guest-chat:latest
docker inspect ladioussuapp/guest-chat:latest --format 'Digest={{index .RepoDigests 0}}'
echo "[3/5] 停止旧容器..."
$COMPOSE down 2>/dev/null || true
echo "[4/5] 启动新栈..."
$COMPOSE up -d --force-recreate
echo "[5/5] 等待就绪..."
sleep 15
$COMPOSE ps
curl -sf -o /dev/null -w "guest HTTP %{http_code}\n" http://127.0.0.1:7788/guest-customer-service || true
echo ""
echo "完成。请访问:"
echo " http://test.pubuli.com:7788/guest-customer-service"
echo ""
echo "若仍像旧版,请确认 Server 响应头应为 gunicorn,不是 Werkzeug。"