diff options
author | 2021-10-10 14:42:40 +0300 | |
---|---|---|
committer | 2021-10-10 14:52:22 +0300 | |
commit | 79259eb856ea2847a61c44dee4eb03f557a7e4f1 (patch) | |
tree | d54cd0b3706a4d057763e256aab66df0161642af /Dockerfile | |
parent | Fixes 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-- | Dockerfile | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -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"] |