Add Docker

This commit is contained in:
Anibal Angulo
2026-02-22 15:57:57 +00:00
parent 82764bd60b
commit dcc05d697e
2 changed files with 34 additions and 0 deletions

9
.dockerignore Normal file
View File

@@ -0,0 +1,9 @@
.git/
.venv/
.ruff_cache/
__pycache__/
*.pyc
.env
agent.py
AGENTS.md
README.md

25
Dockerfile Normal file
View 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}