Skip to content

Commit 86c85d6

Browse files
committed
build: allinone
1 parent cb8c9b2 commit 86c85d6

File tree

4 files changed

+11
-1
lines changed

4 files changed

+11
-1
lines changed

Dockerfile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,13 @@ COPY g2-ssr/charts/* /app/charts/
4545

4646
RUN npm install
4747

48+
FROM registry.cn-qingdao.aliyuncs.com/dataease/postgres:17.6
49+
ENV PG_PATH=/var/lib/postgresql/data
50+
ENV PG_SH=/usr/local/bin
51+
RUN mkdir -p ${PG_PATH}
52+
COPY --from=registry.cn-qingdao.aliyuncs.com/dataease/postgres:17.6 ${PG_PATH} ${PG_PATH}
53+
COPY --from=registry.cn-qingdao.aliyuncs.com/dataease/postgres:17.6 ${PG_SH} ${PG_SH}
54+
4855
# Runtime stage
4956
FROM registry.cn-qingdao.aliyuncs.com/dataease/sqlbot-base:latest
5057

installer/install.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ SQLBOT_MCP_PORT=8001
99
## 是否使用外部数据库
1010
SQLBOT_EXTERNAL_DB=false
1111
## 数据库地址
12-
SQLBOT_DB_HOST=sqlbot-db
12+
SQLBOT_DB_HOST=localhost
1313
## 数据库端口 (仅使用外部数据库时才生效)
1414
SQLBOT_DB_PORT=5432
1515
## SQLBot 数据库库名

installer/sqlbot/docker-compose.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,14 @@ services:
88
ports:
99
- ${SQLBOT_WEB_PORT}:8000
1010
- ${SQLBOT_MCP_PORT}:8001
11+
- 5432:5432
1112
env_file:
1213
- conf/sqlbot.conf
1314
volumes:
1415
- ./data/sqlbot/excel:/opt/sqlbot/data/excel
1516
- ./data/sqlbot/images:/opt/sqlbot/images
1617
- ./data/sqlbot/logs:/opt/sqlbot/logs
18+
- ./data/postgresql:/var/lib/postgresql/data
1719
depends_on:
1820
sqlbot-db:
1921
condition: service_healthy

start.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
SSR_PATH=/opt/sqlbot/g2-ssr
22
APP_PATH=/opt/sqlbot/app
3+
docker-entrypoint.sh postgres
34
nohup node $SSR_PATH/app.js &
45

56
nohup uvicorn main:mcp_app --host 0.0.0.0 --port 8001 &

0 commit comments

Comments
 (0)