FROM jscorptech/django:latest

ARG SCRIPT="entrypoint.sh"
ENV SCRIPT=$SCRIPT
ENV PROMETHEUS_MULTIPROC_DIR=/tmp/prometheus_metrics

WORKDIR /code

COPY requirements.txt /code/requirements.txt

RUN pip install setuptools && uv pip install -r requirements.txt

COPY ./ /code

COPY ./scripts/$SCRIPT /code/$SCRIPT

RUN chmod +x /code/scripts/$SCRIPT

RUN mkdir -p /tmp/prometheus_metrics

CMD sh /code/scripts/$SCRIPT


