Files
rengine/api/Dockerfile
T
Yogesh OjhaandClaude Opus 5 f833bca08b fix(images): the published image could not start
build.yml pushes yogeshojha/rengine-api and rengine-worker from the
development target on every master push and every release. That target
deliberately does not carry stages/, reports/, interest/, mcp/,
channels/, connectors/ or toolbox/ — compose mounts them from the host
— so the published api image holds app/ nothing and `import app.main`
answers ModuleNotFoundError. Both Dockerfiles said a prod stage must
copy them; neither had one.

Both now do, and the two build workflows target it. Verified by
building each and importing inside: the api loads app.main with
production settings, the worker loads its celery app and all 27 stages.

The ruff package list in the test workflow is written once.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DafWxfoWZXVDgr9KroJBDZ
2026-09-16 11:33:15 +05:30

53 lines
1.1 KiB
Docker

FROM python:3.13-slim AS base
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
PYTHONPATH=/app
WORKDIR /app
COPY --from=ghcr.io/astral-sh/uv:0.12.13 /uv /usr/local/bin/uv
##################################################################
# Development
##################################################################
FROM base AS development
COPY shared /app/shared
COPY tools /app/tools
COPY api/pyproject.toml api/uv.lock* ./
RUN uv sync --no-install-project
EXPOSE 8000
COPY api/entrypoint.sh /app/entrypoint.sh
CMD ["/app/entrypoint.sh"]
##################################################################
# Production: what dev mounts from the host is copied in
##################################################################
FROM development AS production
COPY api/app /app/app
COPY stages /app/stages
COPY reports /app/reports
COPY interest /app/interest
COPY mcp /app/mcp
COPY channels /app/channels
COPY connectors /app/connectors
COPY toolbox /app/toolbox
COPY binaries /app/binaries
COPY alembic /app/alembic
COPY alembic.ini /app/alembic.ini
ENV API_RELOAD=false
CMD ["/app/entrypoint.sh"]