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 1
1
# 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
3
3
4
4
# Install the project into `/app`
5
5
WORKDIR /app
@@ -11,8 +11,8 @@ ENV UV_COMPILE_BYTECODE=1
11
11
ENV UV_LINK_MODE=copy
12
12
13
13
# 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
16
16
17
17
# Install the project's dependencies using the lockfile and settings
18
18
RUN --mount=type=cache,target=/root/.cache/uv \
@@ -28,7 +28,7 @@ RUN --mount=type=cache,target=/root/.cache/uv \
28
28
uv sync --locked --no-dev --no-editable
29
29
30
30
# Production stage - Use minimal Python image
31
- FROM python:3.13-alpine
31
+ FROM python:3.13-bookworm
32
32
33
33
# Set the working directory
34
34
WORKDIR /app
Original file line number Diff line number Diff line change 3
3
from typing import Optional , List , Any
4
4
import concurrent .futures
5
5
import atexit
6
+ import os
6
7
7
8
import clickhouse_connect
8
9
import chdb .session as chs
@@ -316,14 +317,14 @@ def _init_chdb_client():
316
317
317
318
318
319
# Register tools based on configuration
319
- if get_config (). enabled :
320
+ if os . getenv ( "CLICKHOUSE_ENABLED" , "true" ). lower () == "true" :
320
321
mcp .add_tool (list_databases )
321
322
mcp .add_tool (list_tables )
322
323
mcp .add_tool (run_select_query )
323
324
logger .info ("ClickHouse tools registered" )
324
325
325
326
326
- if get_chdb_config (). enabled :
327
+ if os . getenv ( "CHDB_ENABLED" , "false" ). lower () == "true" :
327
328
_chdb_client = _init_chdb_client ()
328
329
if _chdb_client :
329
330
atexit .register (lambda : _chdb_client .close ())
You can’t perform that action at this time.
0 commit comments