Skip to content

Commit f52d4d6

Browse files
Merge pull request #92 from GoodbyePlanet/fix/docker-ci-build-hygiene
fix: Docker/CI build hygiene — silent lockfile fallback and setup-uv version mismatch
2 parents 73e35a7 + 2c608a2 commit f52d4d6

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)