added step to explicitly copy requirements.txt, this optimises the build process, so just a code change does not cause a rebuild of requirements/packages

This commit is contained in:
2025-04-29 15:15:14 +10:00
parent 44c5f91492
commit 1878b3c2f3

View File

@@ -5,8 +5,9 @@ ARG USERID
ARG GROUPID
RUN apt-get dist-upgrade -y
WORKDIR /code
COPY . .
COPY requirements.txt .
RUN pip3 install -r requirements.txt
COPY . .
RUN chown -R ${USERID}:${GROUPID} /code
EXPOSE 80
CMD gunicorn --bind=0.0.0.0:80 --workers=2 --threads=2 main:app --env ENV="production" --error-logfile /code/gunicorn.error.log --access-logfile /code/gunicorn.log --capture-output