chore(api): bundle canon log schemas into image; repo-root build context
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,8 +1,7 @@
|
||||
# /api — FastAPI proxy (charter §4). Docker-based for parity across
|
||||
# dev / homelab VPS / fly.io.
|
||||
# /api — FastAPI proxy (charter §4). Build context is the repo root so the
|
||||
# canon log schemas (/docs/schemas) are bundled into the image.
|
||||
FROM python:3.12-slim
|
||||
|
||||
# Faster, quieter Python in containers.
|
||||
ENV PYTHONUNBUFFERED=1 \
|
||||
PYTHONDONTWRITEBYTECODE=1 \
|
||||
PIP_NO_CACHE_DIR=1
|
||||
@@ -10,11 +9,12 @@ ENV PYTHONUNBUFFERED=1 \
|
||||
WORKDIR /app
|
||||
|
||||
# Install deps first so the layer caches when only app code changes.
|
||||
COPY requirements.txt .
|
||||
COPY api/requirements.txt .
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
# App code.
|
||||
COPY app ./app
|
||||
# App code + the schema contract (single source of truth in docs/schemas).
|
||||
COPY api/app ./app
|
||||
COPY docs/schemas ./schemas
|
||||
|
||||
# Run as non-root.
|
||||
RUN useradd --create-home --uid 1000 appuser
|
||||
|
||||
Reference in New Issue
Block a user