mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
40 lines
875 B
Docker
40 lines
875 B
Docker
FROM public.ecr.aws/lambda/python:3.10
|
|
# FROM python:3.11.10-bullseye
|
|
|
|
|
|
ARG DEV_DB_HOST
|
|
ARG DEV_DB_PORT
|
|
ARG DEV_DB_NAME
|
|
ARG EPC_AUTH_TOKEN
|
|
|
|
ENV DB_HOST=${DEV_DB_HOST}
|
|
ENV DB_PORT=${DEV_DB_PORT}
|
|
ENV DB_NAME=${DEV_DB_NAME}
|
|
ENV EPC_AUTH_TOKEN=${EPC_AUTH_TOKEN}}
|
|
|
|
|
|
# Set working directory (Lambda task root)
|
|
WORKDIR /var/task
|
|
|
|
# -----------------------------
|
|
# Copy requirements FIRST (for Docker layer caching)
|
|
# -----------------------------
|
|
COPY backend/address2UPRN/handler/requirements.txt .
|
|
|
|
|
|
# Install dependencies into Lambda runtime
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
|
|
# Copy necessary files for database and utility imports
|
|
COPY utils/ utils/
|
|
COPY backend/ backend/
|
|
COPY datatypes/ datatypes/
|
|
|
|
# Copy the handler
|
|
COPY backend/address2UPRN/main.py .
|
|
|
|
# -----------------------------
|
|
# Lambda handler
|
|
# -----------------------------
|
|
CMD ["main.handler"]
|