clouddreamai-cicd-setup 1.5.43 → 1.5.45

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.43",
3
+ "version": "1.5.45",
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",
@@ -385,10 +385,10 @@ create_database() {
385
385
  fi
386
386
 
387
387
  if [ -f "$PG_HBA" ]; then
388
- # 检查是否已允许 Docker 网络连接
389
- if ! grep -q "172.17.0.0/16" "$PG_HBA"; then
390
- echo "配置 PostgreSQL 允许 Docker 容器连接..."
391
- echo "host all all 172.17.0.0/16 md5" >> "$PG_HBA"
388
+ # 允许所有 IP 连接(Docker 网段可能是 172.17.x.x、172.26.x.x 等,直接放开最简单)
389
+ if ! grep -q "0.0.0.0/0" "$PG_HBA"; then
390
+ echo "配置 PostgreSQL 允许外部连接..."
391
+ echo "host all all 0.0.0.0/0 md5" >> "$PG_HBA"
392
392
  PG_RESTART_NEEDED=true
393
393
  fi
394
394
  fi
@@ -609,11 +609,11 @@ fi
609
609
  # 检查部署状态
610
610
  echo "检查部署状态..."
611
611
  sleep 10
612
- if docker-compose ps | grep -q "$APP_NAME.*Up"; then
612
+ if docker ps --format '{{.Names}} {{.Status}}' | grep -q "$APP_NAME.*Up"; then
613
613
  echo "部署成功! $APP_NAME 服务已启动"
614
614
  else
615
615
  echo "部署失败! 请检查日志"
616
- docker-compose logs
616
+ docker logs $APP_NAME --tail 50 2>&1 || true
617
617
  exit 1
618
618
  fi
619
619