P23 — Skinny Packages: - Break conf→bib circular dependency with lazy guarded import - Extract aco.table.base → conf.table_base (shared foundation) - Add try/except ImportError guards on all cross-module imports - Define per-module optional-dependencies in pyproject.toml - Slim base deps to just pydantic; all heavy deps in optional groups - Add gen_config.py --check validation for module/dep sync - Add skinny-install CI matrix job (tests each extra in isolation) P24 — Tree Reorganization: - Move service configs to infra/ (traefik, coredns, grafana, etc.) - Consolidate Dockerfiles under infra/images/ - Move styles/ → assets/css/ + assets/icons/ + assets/nature.py - Update compose.yml, stack.toml, gen_config.py, all backend emitters - Update bootstrap scripts and install_certs.sh P25 — Cloud Provider Abstraction: - Add cloud/ directory with self-hosted, aws, gcp, azure stubs - Add cloud contexts (aws, gcp, azure) to stack.toml - Add conf/storage.py — get_filesystem() dispatches per context - Add aws, gcp, azure optional dependency groups - Document service mapping for each provider All 11955 tests pass. Zero functionality lost.
30 lines
818 B
Docker
30 lines
818 B
Docker
# syntax=docker/dockerfile:1
|
|
FROM ghcr.io/astral-sh/uv:python3.13-bookworm-slim
|
|
|
|
WORKDIR /app
|
|
|
|
# Patch base image CVEs
|
|
RUN apt-get update && apt-get upgrade -y && rm -rf /var/lib/apt/lists/*
|
|
|
|
# Copy project files for install
|
|
COPY pyproject.toml uv.lock README.md ./
|
|
COPY src/ src/
|
|
|
|
# Install the package (no dev deps)
|
|
ENV UV_PYTHON_PREFERENCE=only-system \
|
|
UV_LINK_MODE=copy \
|
|
UV_PROJECT_ENVIRONMENT=.venv
|
|
RUN uv sync --no-dev && uv pip install -e .
|
|
|
|
# Config
|
|
COPY stack.toml ./
|
|
|
|
EXPOSE 8000
|
|
|
|
HEALTHCHECK --interval=30s --timeout=5s --retries=3 \
|
|
CMD python -c "import urllib.request; urllib.request.urlopen('http://localhost:8000/health')" || exit 1
|
|
|
|
CMD ["uv", "run", "--no-sync", "uvicorn", "api.server:app", \
|
|
"--host", "0.0.0.0", "--port", "8000", \
|
|
"--workers", "1", "--log-level", "info"]
|