fix(deploy): ???????? Nginx ???????

Made-with: Cursor
This commit is contained in:
whm
2026-03-27 12:04:22 +08:00
parent 0980d1fa9c
commit 89cc1d2368
4 changed files with 44 additions and 34 deletions

View File

@@ -356,16 +356,16 @@ elif [ -f "$ROOT/nginx/$NGINX_DOMAIN/fullchain.pem" ] && [ -f "$ROOT/nginx/$NGIN
fi
# shellcheck disable=SC1091
. "$ROOT/scripts/lib-yh-compose-deploy.sh"
# 先停掉本项目 Compose 栈(不操作宿主机 nginx 服务);再按宿主机 Nginx 是否在线拉起容器
# 先停掉本项目容器(不停止宿主机 nginx→ 准备宿主机站点并确保 nginx 在线 → 启动业务容器
yh_compose_down
echo ""
echo "[3/3] 宿主机 Nginx 站点与服务..."
yh_install_host_nginx_site_conf
ensure_host_nginx_started
yh_compose_up
# 可选web/promotion/视频发布 -> data/uploads + MongoDB须 server/.env 中 YH_IMPORT_PROMOTION_SITE_ID
bash "$ROOT/scripts/run-promotion-import-on-deploy.sh" "$ROOT"
echo ""
echo "[3/3] 宿主机 Nginx 站点(仅当 systemctl 显示 Nginx 已运行时写入 yuheng.host.conf 并重载,不执行 start/stop..."
yh_install_host_nginx_site_conf
echo ""
echo "完成. 对外仅 443反代: https://$NGINX_DOMAIN"