diff --git a/installer/install.conf b/installer/install.conf index 53211023..7aaaabee 100644 --- a/installer/install.conf +++ b/installer/install.conf @@ -5,6 +5,20 @@ SQLBOT_BASE=/opt SQLBOT_WEB_PORT=8000 SQLBOT_MCP_PORT=8001 +# 数据库配置 +## 是否使用外部数据库 +SQLBOT_EXTERNAL_DB=false +## 数据库地址 +SQLBOT_DB_HOST=localhost +## 数据库端口 (仅使用外部数据库时才生效) +SQLBOT_DB_PORT=5432 +## SQLBot 数据库库名 +SQLBOT_DB_DB=sqlbot +## 数据库用户名 +SQLBOT_DB_USER=root +## 数据库密码,密码如包含特殊字符,请用双引号引起来,例如 SQLBOT_DB_PASSWORD="Test@4&^%*^" +SQLBOT_DB_PASSWORD=Password123@pg + # 其他配置 ## 普通用户默认密码 SQLBOT_DEFAULT_PWD=SQLBot@123456 diff --git a/installer/sqlbot/templates/sqlbot.conf b/installer/sqlbot/templates/sqlbot.conf index 6f8ceb1b..c4012e67 100644 --- a/installer/sqlbot/templates/sqlbot.conf +++ b/installer/sqlbot/templates/sqlbot.conf @@ -10,4 +10,11 @@ SQL_DEBUG=False CACHE_TYPE=${SQLBOT_CACHE_TYPE} +# Postgres +POSTGRES_SERVER=${SQLBOT_DB_HOST} +POSTGRES_PORT=${SQLBOT_DB_PORT} +POSTGRES_DB=${SQLBOT_DB_DB} +POSTGRES_USER=${SQLBOT_DB_USER} +POSTGRES_PASSWORD=${SQLBOT_DB_PASSWORD} # Change this to your pwd + SERVER_IMAGE_HOST=${SQLBOT_SERVER_IMAGE_HOST} \ No newline at end of file