# OrgState Engine — production image for the unified monorepo. # Builds ONLY the new packages (core / verticals / infra / harness). legacy/, # docs/, gtm/ and tests/ are excluded via .dockerignore — see MIGRATION_MAP.md. FROM python:3.11-slim ENV PYTHONDONTWRITEBYTECODE=1 \ PYTHONUNBUFFERED=1 \ ORGSTATE_DB_PATH=/data/orgstate.sqlite3 \ ORGSTATE_HOST=0.0.0.0 \ ORGSTATE_PORT=8080 WORKDIR /app RUN apt-get update \ && apt-get install -y --no-install-recommends curl ca-certificates \ && rm -rf /var/lib/apt/lists/* # deps first for layer caching COPY requirements-runtime.txt . RUN pip install --no-cache-dir -r requirements-runtime.txt # the new monorepo packages only COPY core/ ./core/ COPY verticals/ ./verticals/ COPY infra/ ./infra/ COPY harness/ ./harness/ COPY delivery/ ./delivery/ COPY pyproject.toml ./ # shared data volume — API and scheduler both point ORGSTATE_DB_PATH here RUN mkdir -p /data VOLUME ["/data"] EXPOSE 8080 HEALTHCHECK --interval=30s --timeout=5s --start-period=15s --retries=3 \ CMD curl -fsS http://localhost:${ORGSTATE_PORT}/health || exit 1 # default process is the API; the scheduler overrides CMD (see docker-compose.yml) CMD ["bash", "infra/deployment/scripts/start_api.sh"]