Skip to content

Commit fdb362d

Browse files
feat: add installer files & update docker-compose.yaml
1 parent 0aff8e1 commit fdb362d

File tree

10 files changed

+1223
-33
lines changed

10 files changed

+1223
-33
lines changed

.env.example

Lines changed: 0 additions & 26 deletions
This file was deleted.

docker-compose.yaml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,19 +19,13 @@ services:
1919
PROJECT_NAME: "SQLBot"
2020
DEFAULT_PWD: "SQLBot@123456"
2121
# MCP settings
22-
MCP_IMAGE_PATH: /opt/sqlbot/images
23-
MCP_IMAGE_HOST: http://localhost:3000
24-
SERVER_IMAGE_HOST: https://sqlbot.fit2cloud.cn/images/
22+
SERVER_IMAGE_HOST: https://YOUR_SERVE_IP:MCP_PORT/images/
2523
# Auth & Security
26-
TOKEN_KEY: "X-SQLBOT-TOKEN"
27-
ASSISTANT_TOKEN_KEY: "X-SQLBOT-ASSISTANT-TOKEN"
2824
SECRET_KEY: y5txe1mRmS_JpOrUzFzHEu-kIQn3lf7ll0AOv9DQh0s
2925
# CORS settings
3026
BACKEND_CORS_ORIGINS: "http://localhost,http://localhost:5173,https://localhost,https://localhost:5173"
3127
# Logging
3228
LOG_LEVEL: "INFO"
33-
LOG_DIR: "/opt/sqlbot/logs"
34-
LOG_FORMAT: "%(asctime)s - %(name)s - %(levelname)s:%(lineno)d - %(message)s"
3529
SQL_DEBUG: False
3630
volumes:
3731
- ./data/sqlbot/excel:/opt/sqlbot/data/excel

installer/docker-compose-pg.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
services:
2+
sqlbot-db:
3+
image: registry.cn-qingdao.aliyuncs.com/dataease/postgres:17.5
4+
container_name: sqlbot-db
5+
restart: always
6+
networks:
7+
- sqlbot-network
8+
volumes:
9+
- ./data/postgresql:/var/lib/postgresql/data
10+
env_file:
11+
- conf/sqlbot.conf
12+
healthcheck:
13+
test: ["CMD-SHELL", "pg_isready"]
14+
interval: 3s
15+
timeout: 5s
16+
retries: 5

installer/docker-compose.yaml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
services:
2+
sqlbot:
3+
image: registry.cn-qingdao.aliyuncs.com/dataease/sqlbot:v0.9.5
4+
container_name: sqlbot
5+
restart: always
6+
networks:
7+
- sqlbot-network
8+
ports:
9+
- ${SQLBOT_WEB_PORT}:8000
10+
- ${SQLBOT_MCP_PORT}:8001
11+
env_file:
12+
- conf/sqlbot.conf
13+
volumes:
14+
- ./data/sqlbot/excel:/opt/sqlbot/data/excel
15+
- ./data/sqlbot/images:/opt/sqlbot/images
16+
- ./data/sqlbot/logs:/opt/sqlbot/logs
17+
depends_on:
18+
sqlbot-db:
19+
condition: service_healthy
20+
21+
networks:
22+
sqlbot-network:

installer/install.conf

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# 基础配置
2+
## 安装目录
3+
SQLBOT_BASE=/opt
4+
## SQLBot 端口
5+
SQLBOT_WEB_PORT=8000
6+
SQLBOT_MCP_PORT=8001
7+
8+
# 数据库配置
9+
## 是否使用外部数据库
10+
SQLBOT_EXTERNAL_DB=false
11+
## 数据库地址
12+
SQLBOT_DB_HOST=sqlbot-db
13+
## 数据库端口 (仅使用外部数据库时才生效)
14+
SQLBOT_DB_PORT=5432
15+
## SQLBot 数据库库名
16+
SQLBOT_DB_DB=sqlbot
17+
## 数据库用户名
18+
SQLBOT_DB_USER=root
19+
## 数据库密码,密码如包含特殊字符,请用双引号引起来,例如 SQLBOT_DB_PASSWORD="Test@4&^%*^"
20+
SQLBOT_DB_PASSWORD=Password123@pg
21+
22+
# 其他配置
23+
## 普通用户默认密码
24+
SQLBOT_DEFAULT_PWD=SQLBot@123456
25+
## SQLBot Secret Key
26+
SQLBOT_SECRET_KEY=y5txe1mRmS_JpOrUzFzHEu-kIQn3lf7ll0AOv9DQh0s
27+
## Cross-Origin Resource Sharing (CORS) 设置
28+
SQLBOT_CORS_ORIGINS=http://localhost,http://localhost:5173,https://localhost,https://localhost:5173
29+
## 日志级别 DEBUG, INFO, WARNING, ERROR
30+
SQLBOT_LOG_LEVEL="INFO"
31+
## 缓存类型
32+
SQLBOT_CACHE_TYPE="memory"
33+
## MCP 图片存储路径
34+
SQLBOT_SERVER_IMAGE_HOST=https://YOUR_SERVER_IP:MCP_PORT/images/

0 commit comments

Comments
 (0)