mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-07-27 23:35:01 +00:00
Fix the condition Lambda Dockerfile for the DDD layout
The lift-and-shift moved the handler to applications/condition/handler.py and split the module across domain/infrastructure/repositories/applications, but the Dockerfile still COPYed backend/condition/ and ran the old CMD path. Update the COPYs to the handler's real import closure (the DDD dirs + the legacy backend Base/db_session/settings bridges) and the CMD to applications/condition/handler. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
37745939b3
commit
689b0a5618
1 changed files with 12 additions and 8 deletions
|
|
@ -20,22 +20,26 @@ COPY backend/.env.test backend/.env
|
|||
# -----------------------------
|
||||
# Copy requirements FIRST (for Docker layer caching)
|
||||
# -----------------------------
|
||||
COPY backend/condition/handler/requirements.txt .
|
||||
COPY applications/condition/requirements.txt .
|
||||
|
||||
# Install dependencies into Lambda runtime
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
# -----------------------------
|
||||
# Copy application code
|
||||
# Copy application code (the handler's import closure — DDD layout)
|
||||
# -----------------------------
|
||||
COPY utils/ utils/
|
||||
COPY backend/condition/ backend/condition/
|
||||
COPY domain/ domain/
|
||||
COPY infrastructure/ infrastructure/
|
||||
COPY repositories/ repositories/
|
||||
COPY applications/ applications/
|
||||
|
||||
COPY backend/app/db/models/condition.py backend/app/db/models/condition.py
|
||||
# Legacy backend bridges still imported by the condition module:
|
||||
# ConditionPostgres -> backend.app.db.connection (db_session);
|
||||
# condition_tables -> backend.app.db.base (Base); connection -> backend.app.config.
|
||||
COPY backend/app/config.py backend/app/config.py
|
||||
COPY backend/app/db/base.py backend/app/db/base.py
|
||||
COPY backend/app/db/connection.py backend/app/db/connection.py
|
||||
COPY backend/app/config.py backend/app/config.py
|
||||
|
||||
COPY backend/__init__.py backend/__init__.py
|
||||
COPY backend/app/__init__.py backend/app/__init__.py
|
||||
COPY backend/app/db/__init__.py backend/app/db/__init__.py
|
||||
|
|
@ -44,6 +48,6 @@ COPY backend/app/db/__init__.py backend/app/db/__init__.py
|
|||
# -----------------------------
|
||||
# Lambda handler
|
||||
# -----------------------------
|
||||
CMD ["backend/condition/handler/handler.handler"]
|
||||
CMD ["applications/condition/handler.handler"]
|
||||
# For local running
|
||||
# CMD ["python", "-m", "backend.condition.handler.handler"]
|
||||
# CMD ["python", "-m", "applications.condition.handler"]
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue