clouddreamai-cicd-setup 1.5.40 → 1.5.41

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clouddreamai-cicd-setup",
3
- "version": "1.5.40",
3
+ "version": "1.5.41",
4
4
  "description": "CloudDreamAI GitLab CI/CD 自动配置工具 - 支持 NestJS/Vue/React 项目的一键 CI/CD 配置",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -400,6 +400,10 @@ create_database() {
400
400
  fi
401
401
 
402
402
  if [ "$PG_RESTART_NEEDED" = true ]; then
403
+ # 先停掉旧容器,避免 PostgreSQL 重启后出现共享内存错误
404
+ echo "停止旧容器(如果存在)..."
405
+ docker container ls -q --filter "name=$APP_NAME" | xargs -r docker container stop 2>/dev/null || true
406
+
403
407
  echo "重启 PostgreSQL 服务..."
404
408
  # 宝塔 PostgreSQL 需要用 postgres 用户重启,且必须用 restart 而非 reload 才能让 listen_addresses 生效
405
409
  if [ -x "/www/server/pgsql/bin/pg_ctl" ]; then