From 1878b3c2f37be415cfe6ae78473d612f6d126ab5 Mon Sep 17 00:00:00 2001 From: Damien De Paoli Date: Tue, 29 Apr 2025 15:15:14 +1000 Subject: [PATCH] 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 --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index ca10939..21159c7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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