aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar scragly <[email protected]>2019-09-23 10:24:42 +1000
committerGravatar scragly <[email protected]>2019-09-23 10:24:42 +1000
commitffec34839a3845bc06d5cf35a31211c40e6112a5 (patch)
treef4e0c0fcd23858c1e102f03c4d1a5c37a073dbfd
parentFix shell script name for whl building to reference wiki pkg. (diff)
Install pipenv & pyuwsgi before copying project for better layer caching.
-rw-r--r--docker/app/Dockerfile5
-rw-r--r--docker/app/local.Dockerfile5
2 files changed, 8 insertions, 2 deletions
diff --git a/docker/app/Dockerfile b/docker/app/Dockerfile
index 7059dd9b..a6986fb2 100644
--- a/docker/app/Dockerfile
+++ b/docker/app/Dockerfile
@@ -11,12 +11,15 @@ ENV PIP_NO_CACHE_DIR=false \
# Create non-root user.
RUN useradd --system --shell /bin/false --uid 1500 pysite
+# Install pipenv & pyuwsgi
+RUN pip install -U pipenv pyuwsgi
+
# Copy the project files into working directory
WORKDIR /app
COPY . .
# Install project dependencies
-RUN pip install -U pipenv pyuwsgi && pipenv install --system --deploy
+RUN pipenv install --system --deploy
# Migrate, collect and start the app
RUN chmod +x /app/docker/app/scripts/migrate.sh
diff --git a/docker/app/local.Dockerfile b/docker/app/local.Dockerfile
index e53e300f..9e15c438 100644
--- a/docker/app/local.Dockerfile
+++ b/docker/app/local.Dockerfile
@@ -11,12 +11,15 @@ ENV PIP_NO_CACHE_DIR=false \
# Create non-root user
RUN useradd --system --shell /bin/false --uid 1500 pysite
+# Install pipenv & pyuwsgi
+RUN pip install -U pipenv pyuwsgi
+
# Copy the project files into working directory
WORKDIR /app
COPY . .
# Install project dependencies
-RUN pip install -U pipenv pyuwsgi && pipenv install --system --deploy
+RUN pipenv install --system --deploy
# Prepare static files for site
RUN SECRET_KEY=placeholder DATABASE_URL=sqlite:// \