diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..bd1a18a --- /dev/null +++ b/.dockerignore @@ -0,0 +1,9 @@ +.git/ +.venv/ +.ruff_cache/ +__pycache__/ +*.pyc +.env +agent.py +AGENTS.md +README.md diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..8b5ff40 --- /dev/null +++ b/Dockerfile @@ -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}