diff --git a/Dockerfile b/Dockerfile index b1c1e9256..c8727b40a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -95,6 +95,6 @@ EXPOSE 3000 8000 8001 5432 # Add health check HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \ - CMD curl -f http://localhost:8000 || exit 1 + CMD python3 -c "import os, urllib.request; urllib.request.urlopen(f'http://localhost:8000/{os.environ.get(\"CONTEXT_PATH\", \"\")}', timeout=3)" || exit 1 ENTRYPOINT ["sh", "start.sh"] diff --git a/installer/install.conf b/installer/install.conf index 6cf9c3c1d..42a58a7c6 100644 --- a/installer/install.conf +++ b/installer/install.conf @@ -34,3 +34,5 @@ SQLBOT_CACHE_TYPE="memory" SQLBOT_SERVER_IMAGE_HOST=http://YOUR_SERVER_IP:MCP_PORT/images/ ##Token过期时间: 60 minutes * 24 hours * 8 days = 11520 minutes SQLBOT_ACCESS_TOKEN_EXPIRE_MINUTES=11520 +## 上下文路径 +SQLBOT_CONTEXT_PATH= diff --git a/installer/sqlbot/templates/sqlbot.conf b/installer/sqlbot/templates/sqlbot.conf index 77281fa39..d9fe53425 100644 --- a/installer/sqlbot/templates/sqlbot.conf +++ b/installer/sqlbot/templates/sqlbot.conf @@ -19,3 +19,5 @@ POSTGRES_PASSWORD=${SQLBOT_DB_PASSWORD} SERVER_IMAGE_HOST=${SQLBOT_SERVER_IMAGE_HOST} ACCESS_TOKEN_EXPIRE_MINUTES=${SQLBOT_ACCESS_TOKEN_EXPIRE_MINUTES} + +CONTEXT_PATH=${SQLBOT_CONTEXT_PATH}