-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from smithery-ai/smithery/config-puw2
Deployment: Dockerfile and Smithery config
- Loading branch information
Showing
3 changed files
with
47 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Generated by https://smithery.ai. See: https://smithery.ai/docs/config#dockerfile | ||
# Use a Python image with uv pre-installed | ||
FROM ghcr.io/astral-sh/uv:python3.12-bookworm-slim AS uv | ||
|
||
# Set the working directory | ||
WORKDIR /app | ||
|
||
# Enable bytecode compilation | ||
ENV UV_COMPILE_BYTECODE=1 | ||
|
||
# Copy the pyproject.toml file first for caching layer | ||
COPY pyproject.toml /app/pyproject.toml | ||
|
||
# Install the project's dependencies | ||
RUN --mount=type=cache,target=/root/.cache/uv \ | ||
--mount=type=bind,source=pyproject.toml,target=pyproject.toml \ | ||
uv sync --frozen --no-install-project --no-dev --no-editable | ||
|
||
# Then, add the rest of the project source code and install it | ||
# Installing separately from its dependencies allows optimal layer caching | ||
ADD . /app | ||
RUN --mount=type=cache,target=/root/.cache/uv \ | ||
uv sync --frozen --no-dev --no-editable | ||
|
||
# Set the environment variable for the API key | ||
ENV SEARCH_API_KEY=your_api_key_here | ||
|
||
# Default command to run the server | ||
CMD ["uv", "--directory", "/app/src", "run", "search.server"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Smithery configuration file: https://smithery.ai/docs/config#smitheryyaml | ||
|
||
startCommand: | ||
type: stdio | ||
configSchema: | ||
# JSON Schema defining the configuration options for the MCP. | ||
type: object | ||
required: | ||
- searchApiKey | ||
properties: | ||
searchApiKey: | ||
type: string | ||
description: The API key for the Brave Search server. | ||
commandFunction: | ||
# A function that produces the CLI command to start the MCP on stdio. | ||
|- | ||
(config) => ({command:'uv', args:['--directory', '/app/src', 'run', 'search.server'], env:{SEARCH_API_KEY:config.searchApiKey}}) |