Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,16 @@ CMD ["uv", "run", "pytest"]
# ─── Builder: production deps only ────────────────────────────────────────────
FROM base AS builder

# Install external deps first (cached when only src/ changes)
COPY pyproject.toml uv.lock* ./
RUN --mount=type=cache,target=/root/.cache/uv \
uv sync --no-dev
uv sync --no-dev --no-install-project

# Install the project itself (hatchling reads README.md + LICENSE at build time)
COPY README.md LICENSE ./
COPY src/ ./src/
RUN --mount=type=cache,target=/root/.cache/uv \
uv sync --no-dev

# ─── Production: minimal runtime image ────────────────────────────────────────
FROM python:${PYTHON_VERSION}-slim-bookworm AS prod
Expand Down
Loading