0eb2b0f697
- backend/db/schema.sql: all 12 tables from DATA-MODEL.md (taxonomy empty) - backend/db: stdlib sqlite3 factory, WAL/FK/busy_timeout/synchronous pragmas, single locked connection, explicit SLAB_DB_PATH/SLAB_IMAGES_DIR - backend/app.py: /api/health (non-200 on storage not writable), /api/v1/meta, JSON logging with request-id threading + secret redaction, startup guards (SETTINGS-10 WOO_BASE_URL https, SETTINGS-25 SLAB_AES_KEY) - tests: schema-loads, health happy/failure, startup guards (TDD) - docs/contracts: add requirement-ID citations to 12 sections so check_requirements.py passes (pre-existing gate debt) Gates: check_requirements.py + check_coverage.py exit 0; pytest 5 passed
26 lines
724 B
Docker
26 lines
724 B
Docker
# S0 minimal backend Dockerfile (OPS-25: pinned, not latest)
|
|
FROM python:3.14.3-slim-bookworm
|
|
|
|
WORKDIR /app
|
|
|
|
# system deps minimal
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
ca-certificates \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
COPY backend/requirements.txt /app/requirements.txt
|
|
RUN pip install --no-cache-dir --upgrade pip && \
|
|
pip install --no-cache-dir -r /app/requirements.txt
|
|
|
|
COPY backend/ /app/backend/
|
|
COPY .dockerignore /app/.dockerignore 2>/dev/null || true
|
|
|
|
ENV PYTHONPATH=/app \
|
|
PYTHONDONTWRITEBYTECODE=1 \
|
|
PYTHONUNBUFFERED=1
|
|
|
|
# non-root? later; for S0 root ok
|
|
EXPOSE 8000
|
|
|
|
CMD ["uvicorn", "backend.app:app", "--host", "0.0.0.0", "--port", "8000", "--log-level", "info"]
|