Files
KiloStar/Dockerfile
T
zhaoxi c0fcbe2849 feat(mcp): 完整落地 MCP 服务管理
- Dockerfile 后端 stage 加 nodejs/npm,支持 stdio MCP server
- 新增前端 MCP 服务管理 UI(MCPSettings.tsx),支持 stdio/sse/http 三种 transport
- PluginLayout 改双 tab(技能 / MCP 服务)
- i18n 补 MCP 相关 zh/en 文案
- send_file 工具的 trace_id 改可选,聊天场景退化为返回内容
- system_workflow 工具集纳入 send_file

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-06 04:43:08 +00:00

45 lines
1.2 KiB
Docker

# Stage 1: Build the React frontend
FROM node:22-alpine AS frontend-builder
WORKDIR /app/frontend
# Install dependencies and build the static assets
COPY frontend/package*.json ./
RUN npm ci
COPY frontend/ .
RUN npm run build
# Stage 2: Build the Python backend and serve
FROM python:3.13-slim
WORKDIR /app
# Install system dependencies (for building PostgreSQL drivers and other native extensions)
# nodejs/npm are needed for stdio-mode MCP servers (e.g. npx -y @modelcontextprotocol/...)
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
libpq-dev \
git \
nodejs \
npm \
&& rm -rf /var/lib/apt/lists/*
# Install uv package manager
RUN pip install uv
# Copy dependency files
COPY pyproject.toml uv.lock ./
# Install python dependencies without the current package (speeds up layer caching)
RUN uv sync --frozen --no-install-project --no-dev
# Copy the rest of the application
COPY . .
# Copy the built frontend static assets from Stage 1
COPY --from=frontend-builder /app/frontend/dist /app/frontend/dist
# Expose FastAPI and Ray Dashboard ports
EXPOSE 8000 8265
# Start the application
CMD ["uv", "run", "python", "main.py"]