-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathDockerfile
More file actions
30 lines (21 loc) · 903 Bytes
/
Copy pathDockerfile
File metadata and controls
30 lines (21 loc) · 903 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
FROM python:3.12-slim
WORKDIR /app
# The installer requires curl (and certificates) to download the release archive
RUN apt-get update && apt-get install -y --no-install-recommends curl ca-certificates
# Download the latest installer
ADD https://astral.sh/uv/install.sh /uv-installer.sh
# Run the installer then remove it
RUN sh /uv-installer.sh && rm /uv-installer.sh
# Ensure the installed binary is on the `PATH`
ENV PATH="/root/.local/bin/:$PATH"
# Copy application code
COPY pyproject.toml .
COPY vars.py .
COPY server.py .
# Expose the default MCP port
EXPOSE 8081
# Add healthcheck
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
CMD curl -f http://localhost:8081/healthcheck || exit 1
# Run the server with streamable-http transport
CMD ["uv", "run", "python", "/app/server.py", "--transport", "streamable-http", "--mcp-host", "0.0.0.0", "--mcp-port", "8081"]