Prepare scoped GitOps adoption and tested immutable image releases
Assistant: codex Assistant-Model: gpt-6-astra Assistant-Session: 01a0e241-8285-7a63-8c0c-51c9cb824dc3
This commit is contained in:
parent
5d5ee84d70
commit
c12a8fbcfb
12 changed files with 2585 additions and 731 deletions
16
Dockerfile
16
Dockerfile
|
|
@ -1,13 +1,23 @@
|
|||
# Stage 1 — install Python deps
|
||||
FROM python:3.12-slim AS builder
|
||||
RUN pip install uv --no-cache-dir
|
||||
FROM python:3.12-slim@sha256:78387bc3881b8273120a12ebe6c1ab22b018ccc2c9adf565ae1ac9b536e184ea AS builder
|
||||
RUN pip install uv==0.5.9 --no-cache-dir
|
||||
WORKDIR /app
|
||||
COPY pyproject.toml uv.lock ./
|
||||
COPY src/ ./src/
|
||||
RUN uv sync --no-dev --frozen
|
||||
|
||||
# Isolated CI checks; development dependencies do not enter the runtime image.
|
||||
FROM builder AS test
|
||||
COPY tests/ ./tests/
|
||||
COPY Dockerfile ./Dockerfile
|
||||
COPY .forgejo/workflows/image.yaml ./.forgejo/workflows/image.yaml
|
||||
COPY schemas/ ./schemas/
|
||||
COPY k8s/ ./k8s/
|
||||
COPY scripts/render_gitops.py scripts/check_gitops_promotion.py ./scripts/
|
||||
RUN uv sync --frozen --extra dev && uv run --no-sync pytest -q -p no:cacheprovider tests/test_frontend_patterns.py tests/test_instruction_evaluation.py tests/test_admin_sync_api.py tests/test_gitops_release.py
|
||||
|
||||
# Stage 2 — runtime image
|
||||
FROM python:3.12-slim AS runtime
|
||||
FROM python:3.12-slim@sha256:78387bc3881b8273120a12ebe6c1ab22b018ccc2c9adf565ae1ac9b536e184ea AS runtime
|
||||
WORKDIR /app
|
||||
COPY --from=builder /app/.venv /app/.venv
|
||||
COPY --from=builder /app/src /app/src
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue