Note: The default ITS GitLab runner is a shared resource and is subject to slowdowns during heavy usage.
You can run your own GitLab runner that is dedicated just to your group if you need to avoid processing delays.

Commit 65256574 authored by Jon Yu's avatar Jon Yu
Browse files

Refactor Dockerfile so requirements are cached

parent b93dc882
Pipeline #51665 passed with stage
in 7 seconds
......@@ -2,27 +2,28 @@ FROM python:3.9-slim
ARG ENVIRONMENT="PRODUCTION"
ENV GUNICORN_WORKERS=2
ENV GUNICORN_THREADS=4
ENV PYTHONUNBUFFERED=1
ENV PIP_DISABLE_PIP_VERSION_CHECK=1
ENV GUNICORN_WORKERS=2 \
GUNICORN_THREADS=4 \
PYTHONUNBUFFERED=1 \
PIP_DISABLE_PIP_VERSION_CHECK=1
RUN apt-get -y update && apt-get install -y libpq-dev gcc
WORKDIR /usr/src/app
COPY . /usr/src/app
COPY requirements.txt requirements.prod.txt /tmp/
RUN set -x; \
if [ "${ENVIRONMENT}" = "DEVELOPMENT" ]; then \
pip install -r requirements.txt; \
else \
pip install -r requirements.prod.txt; \
fi;
if [ "${ENVIRONMENT}" = "DEVELOPMENT" ]; then \
pip install -r /tmp/requirements.txt; \
else \
pip install -r /tmp/requirements.prod.txt; \
fi;
RUN apt-get purge -y --auto-remove gcc
COPY . /usr/src/app
# Workaround for permission issue on OpenShift
RUN chmod -R g+rw /usr/src/app
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment