FROM public.ecr.aws/lambda/python:3.11

ARG DEV_DB_HOST
ARG DEV_DB_PORT
ARG DEV_DB_NAME

ENV DB_HOST=${DEV_DB_HOST}
ENV DB_PORT=${DEV_DB_PORT}
ENV DB_NAME=${DEV_DB_NAME}

WORKDIR /var/task

COPY backend/bulk_address2uprn_combiner/handler/requirements.txt .

RUN pip install --no-cache-dir -r requirements.txt

COPY utils/ utils/
COPY backend/ backend/
COPY datatypes/ datatypes/

COPY backend/bulk_address2uprn_combiner/main.py .

CMD ["main.handler"]
