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:
@@ -5,8 +5,9 @@ ARG USERID
|
|||||||
ARG GROUPID
|
ARG GROUPID
|
||||||
RUN apt-get dist-upgrade -y
|
RUN apt-get dist-upgrade -y
|
||||||
WORKDIR /code
|
WORKDIR /code
|
||||||
COPY . .
|
COPY requirements.txt .
|
||||||
RUN pip3 install -r requirements.txt
|
RUN pip3 install -r requirements.txt
|
||||||
|
COPY . .
|
||||||
RUN chown -R ${USERID}:${GROUPID} /code
|
RUN chown -R ${USERID}:${GROUPID} /code
|
||||||
EXPOSE 80
|
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
|
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
|
||||||
|
|||||||
Reference in New Issue
Block a user