Skip to content

Commit b5fd504

Browse files
author
Jove Zhong
committed
Add Dockerfile and smithery.yaml
1 parent 3acbe1c commit b5fd504

File tree

2 files changed

+63
-0
lines changed

2 files changed

+63
-0
lines changed

Dockerfile

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Use a Python image with uv pre-installed
2+
FROM ghcr.io/astral-sh/uv:python3.12-bookworm-slim AS uv
3+
4+
# Install the project into `/app`
5+
WORKDIR /app
6+
7+
# Enable bytecode compilation
8+
ENV UV_COMPILE_BYTECODE=1
9+
10+
# Copy from the cache instead of linking since it's a mounted volume
11+
ENV UV_LINK_MODE=copy
12+
13+
# Install the project's dependencies using the lockfile and settings
14+
RUN --mount=type=cache,target=/root/.cache/uv \
15+
--mount=type=bind,source=uv.lock,target=uv.lock \
16+
--mount=type=bind,source=pyproject.toml,target=pyproject.toml \
17+
uv sync --frozen --no-install-project --no-dev --no-editable
18+
19+
# Then, add the rest of the project source code and install it
20+
# Installing separately from its dependencies allows optimal layer caching
21+
ADD . /app
22+
RUN --mount=type=cache,target=/root/.cache/uv \
23+
uv sync --frozen --no-dev --no-editable
24+
25+
FROM python:3.12-slim-bookworm
26+
27+
WORKDIR /app
28+
29+
COPY --from=uv /root/.local /root/.local
30+
COPY --from=uv --chown=app:app /app/.venv /app/.venv
31+
32+
# Place executables in the environment at the front of the path
33+
ENV PATH="/app/.venv/bin:$PATH"
34+
35+
# when running the container, add --db-path and a bind mount to the host's db file
36+
ENTRYPOINT ["mcp-timeplus"]

smithery.yaml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Smithery.ai configuration
2+
startCommand:
3+
type: stdio
4+
configSchema:
5+
# JSON Schema defining the configuration options for the MCP.
6+
{}
7+
commandFunction:
8+
# A function that produces the CLI command to start the MCP on stdio.
9+
|-
10+
(config) => ({
11+
"command": "uvx",
12+
"args": [
13+
"mcp-timeplus"
14+
],
15+
"env": {
16+
"TIMEPLUS_HOST": "localhost",
17+
"TIMEPLUS_PORT": "8123",
18+
"TIMEPLUS_USER": "default",
19+
"TIMEPLUS_PASSWORD": "",
20+
"TIMEPLUS_SECURE": "false",
21+
"TIMEPLUS_VERIFY": "false",
22+
"TIMEPLUS_CONNECT_TIMEOUT": "30",
23+
"TIMEPLUS_SEND_RECEIVE_TIMEOUT": "30",
24+
"TIMEPLUS_READ_ONLY": "false",
25+
"TIMEPLUS_KAFKA_CONFIG": "{\"bootstrap.servers\":\"host:port\", \"sasl.mechanism\":\"SCRAM-SHA-256\",\"sasl.username\":\"admin\", \"sasl.password\":\"password\",\"security.protocol\":\"SASL_SSL\",\"enable.ssl.certificate.verification\":\"false\"}"
26+
}
27+
})

0 commit comments

Comments
 (0)