File tree Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change 11# Build stage - Use a Python image with uv pre-installed
2- FROM ghcr.io/astral-sh/uv:python3.13-alpine AS builder
2+ FROM ghcr.io/astral-sh/uv:python3.13-bookworm AS builder
33
44# Install the project into `/app`
55WORKDIR /app
@@ -11,8 +11,8 @@ ENV UV_COMPILE_BYTECODE=1
1111ENV UV_LINK_MODE=copy
1212
1313# Install git and build dependencies for ClickHouse client
14- RUN --mount=type=cache,target=/var/cache/apk \
15- apk add git build-base
14+ RUN --mount=type=cache,target=/var/cache/apt \
15+ apt-get update && apt-get install -y git build-essential
1616
1717# Install the project's dependencies using the lockfile and settings
1818RUN --mount=type=cache,target=/root/.cache/uv \
@@ -28,7 +28,7 @@ RUN --mount=type=cache,target=/root/.cache/uv \
2828 uv sync --locked --no-dev --no-editable
2929
3030# Production stage - Use minimal Python image
31- FROM python:3.13-alpine
31+ FROM python:3.13-bookworm
3232
3333# Set the working directory
3434WORKDIR /app
Original file line number Diff line number Diff line change 33from typing import Optional , List , Any
44import concurrent .futures
55import atexit
6+ import os
67
78import clickhouse_connect
89import chdb .session as chs
@@ -319,14 +320,14 @@ def _init_chdb_client():
319320
320321
321322# Register tools based on configuration
322- if get_config (). enabled :
323+ if os . getenv ( "CLICKHOUSE_ENABLED" , "true" ). lower () == "true" :
323324 mcp .add_tool (list_databases )
324325 mcp .add_tool (list_tables )
325326 mcp .add_tool (run_select_query )
326327 logger .info ("ClickHouse tools registered" )
327328
328329
329- if get_chdb_config (). enabled :
330+ if os . getenv ( "CHDB_ENABLED" , "false" ). lower () == "true" :
330331 _chdb_client = _init_chdb_client ()
331332 if _chdb_client :
332333 atexit .register (lambda : _chdb_client .close ())
You can’t perform that action at this time.
0 commit comments