From fd94057e2b05bb5a1b98339d99bb2a853217b832 Mon Sep 17 00:00:00 2001 From: lgh <625458956@qq.com> Date: Sat, 21 Feb 2026 00:03:42 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BA=A4=E4=BA=92=E5=BC=8F=E8=BE=93?= =?UTF-8?q?=E5=85=A5=E6=95=B0=E6=8D=AE=E5=BA=93=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- deploy.sh | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/deploy.sh b/deploy.sh index ef04aae..6f1ba0a 100644 --- a/deploy.sh +++ b/deploy.sh @@ -18,8 +18,23 @@ PROJECT_DIR="/opt/neural-sync" # 1Panel PostgreSQL 默认配置 DB_USER="root" DB_PASSWORD="postgres" -DB_HOST=${1:-"localhost"} -DB_PORT=${2:-5432} + +# 交互式获取数据库配置 +if [ -z "$1" ]; then + echo "" + echo -e "${YELLOW}请输入 PostgreSQL 数据库主机地址:${NC}" + echo " (本地请直接回车,默认: localhost)" + read -p "主机地址 [localhost]: " DB_HOST + DB_HOST=${DB_HOST:-localhost} + + echo -e "${YELLOW}请输入 PostgreSQL 端口:${NC}" + read -p "端口 [5432]: " DB_PORT + DB_PORT=${DB_PORT:-5432} +else + DB_HOST=$1 + DB_PORT=${2:-5432} +fi + GIT_REPO=${3:-""} # 检查是否为 root 用户