aboutsummaryrefslogtreecommitdiffstats
path: root/Dockerfile
diff options
context:
space:
mode:
authorGravatar Hassan Abouelela <[email protected]>2021-10-10 14:42:40 +0300
committerGravatar Hassan Abouelela <[email protected]>2021-10-10 14:52:22 +0300
commit79259eb856ea2847a61c44dee4eb03f557a7e4f1 (patch)
treed54cd0b3706a4d057763e256aab66df0161642af /Dockerfile
parentFixes Caching On Docker Build (diff)
Merges Dockerfiles
Merges the normal dockerfile with the static build one to reduce duplication. Signed-off-by: Hassan Abouelela <[email protected]>
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile6
1 files changed, 6 insertions, 0 deletions
diff --git a/Dockerfile b/Dockerfile
index 046e7f80..2b039fab 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -36,6 +36,12 @@ RUN \
METRICITY_DB_URL=postgres://localhost \
python manage.py collectstatic --noinput --clear
+# Build static files if we are doing a static build
+ARG STATIC_BUILD=false
+RUN if [ $STATIC_BUILD = "TRUE" ] ; \
+ then SECRET_KEY=dummy_value python manage.py distill-local build --traceback --force ; \
+fi
+
# Run web server through custom manager
ENTRYPOINT ["python", "manage.py"]
CMD ["run"]