forked from va/knowledge-search-mcp
Add Docker
This commit is contained in:
9
.dockerignore
Normal file
9
.dockerignore
Normal file
@@ -0,0 +1,9 @@
|
||||
.git/
|
||||
.venv/
|
||||
.ruff_cache/
|
||||
__pycache__/
|
||||
*.pyc
|
||||
.env
|
||||
agent.py
|
||||
AGENTS.md
|
||||
README.md
|
||||
25
Dockerfile
Normal file
25
Dockerfile
Normal file
@@ -0,0 +1,25 @@
|
||||
FROM python:3.12-slim AS builder
|
||||
|
||||
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /usr/local/bin/
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY pyproject.toml uv.lock ./
|
||||
RUN uv sync --no-dev --frozen --no-install-project
|
||||
|
||||
COPY main.py .
|
||||
|
||||
FROM python:3.12-slim
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY --from=builder /app /app
|
||||
|
||||
ENV PATH="/app/.venv/bin:$PATH"
|
||||
|
||||
# Cloud Run injects PORT (defaults to 8080)
|
||||
ENV PORT=8080
|
||||
EXPOSE ${PORT}
|
||||
|
||||
# Shell form so ${PORT} is expanded at runtime
|
||||
CMD python main.py --transport sse --port ${PORT}
|
||||
Reference in New Issue
Block a user