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
@@ -316,14 +317,14 @@ def _init_chdb_client():
316317
317318
318319# Register tools based on configuration
319- if get_config (). enabled :
320+ if os . getenv ( "CLICKHOUSE_ENABLED" , "true" ). lower () == "true" :
320321 mcp .add_tool (list_databases )
321322 mcp .add_tool (list_tables )
322323 mcp .add_tool (run_select_query )
323324 logger .info ("ClickHouse tools registered" )
324325
325326
326- if get_chdb_config (). enabled :
327+ if os . getenv ( "CHDB_ENABLED" , "false" ). lower () == "true" :
327328 _chdb_client = _init_chdb_client ()
328329 if _chdb_client :
329330 atexit .register (lambda : _chdb_client .close ())
You can’t perform that action at this time.
0 commit comments