宇恒一号官网

This commit is contained in:
whm
2026-03-17 00:59:32 +08:00
commit eb56519df7
105 changed files with 10783 additions and 0 deletions

24
pull-and-restart.sh Normal file
View File

@@ -0,0 +1,24 @@
#!/usr/bin/env bash
# 拉取代码并重启项目(线上建议放在 /home/yxd/project执行 ./pull-and-restart.sh
# 也可指定目录PROJECT_ROOT=/home/yxd/project ./pull-and-restart.sh
set -e
ROOT="${PROJECT_ROOT:-$(cd "$(dirname "$0")" && pwd)}"
cd "$ROOT"
echo "=========================================="
echo " yh_web 拉取并重启"
echo " 路径: $ROOT"
echo "=========================================="
[ -f server/.env ] && set -a && source server/.env && set +a
echo "[1/2] 拉取代码..."
git pull
echo ""
echo "[2/2] 重新构建并启动..."
docker compose build --no-cache 2>/dev/null || docker-compose build --no-cache
docker compose up -d --force-recreate 2>/dev/null || docker-compose up -d --force-recreate
echo ""
echo "完成. api:9527 web:9528 admin:9529"