Skip to content

Commit 2c608a2

Browse files
GoodbyePlanetclaude
andcommitted
fix: Docker/CI build hygiene issues from #79
- Drop silent uv sync fallback in Dockerfile so lockfile drift fails the build loudly instead of producing an unpinned, unsigned image - Split Dockerfile into builder/runtime stages so the runtime image runs python -m server.main directly instead of re-resolving the env via `uv run` at container start, and no longer ships uv - Align setup-uv action version to v7 in both CI lint and test jobs Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
1 parent 73e35a7 commit 2c608a2

2 files changed

Lines changed: 14 additions & 6 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
runs-on: ubuntu-latest
2424
steps:
2525
- uses: actions/checkout@v7
26-
- uses: astral-sh/setup-uv@v5
26+
- uses: astral-sh/setup-uv@v7
2727
with:
2828
enable-cache: true
2929
- name: Install dependencies

Dockerfile

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,25 @@
1-
FROM python:3.12-slim AS runtime
1+
FROM python:3.12-slim AS builder
22

33
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
44

55
WORKDIR /app
66

7-
# Install Python dependencies
8-
COPY pyproject.toml uv.lock* ./
9-
RUN uv sync --frozen --no-dev --no-editable 2>/dev/null || uv sync --no-dev --no-editable
7+
# Install Python dependencies (fails loudly on lockfile drift instead of silently re-resolving)
8+
COPY pyproject.toml uv.lock ./
9+
RUN uv sync --frozen --no-dev --no-editable
1010

1111
# Copy server source and config
1212
COPY server/ ./server/
1313
COPY config.yaml ./
1414

15+
FROM python:3.12-slim AS runtime
16+
17+
WORKDIR /app
18+
19+
COPY --from=builder /app /app
20+
21+
ENV PATH="/app/.venv/bin:$PATH"
22+
1523
EXPOSE 8090
1624

17-
CMD ["uv", "run", "python", "-m", "server.main"]
25+
CMD ["python", "-m", "server.main"]

0 commit comments

Comments
 (0)