clouddreamai-cicd-setup 1.5.42 → 1.5.44
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
|
@@ -385,10 +385,10 @@ create_database() {
|
|
|
385
385
|
fi
|
|
386
386
|
|
|
387
387
|
if [ -f "$PG_HBA" ]; then
|
|
388
|
-
#
|
|
389
|
-
if ! grep -q "
|
|
390
|
-
echo "配置 PostgreSQL
|
|
391
|
-
echo "host all all
|
|
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
|
|
@@ -411,9 +411,9 @@ create_database() {
|
|
|
411
411
|
docker container ls -q --filter "name=$APP_NAME" | xargs -r docker container stop 2>/dev/null || true
|
|
412
412
|
|
|
413
413
|
echo "重启 PostgreSQL 服务..."
|
|
414
|
-
# 宝塔 PostgreSQL 需要用 postgres
|
|
414
|
+
# 宝塔 PostgreSQL 需要用 postgres 用户重启,用 immediate 模式强制立即关闭
|
|
415
415
|
if [ -x "/www/server/pgsql/bin/pg_ctl" ]; then
|
|
416
|
-
sudo -u postgres /www/server/pgsql/bin/pg_ctl restart -D /www/server/pgsql/data -m
|
|
416
|
+
sudo -u postgres /www/server/pgsql/bin/pg_ctl restart -D /www/server/pgsql/data -m immediate -t 10 2>&1 || true
|
|
417
417
|
else
|
|
418
418
|
systemctl restart postgresql 2>/dev/null || /etc/init.d/postgresql restart 2>/dev/null || true
|
|
419
419
|
fi
|