Self hosted FLOSS fitness/workout, nutrition and weight tracker
Move image download to container startup
Scott Peshak9f1abb125abb
diff --git a/extras/docker/apache/Dockerfile b/extras/docker/apache/Dockerfileindex 22316cd7a..636e8d2e5 100644--- a/extras/docker/apache/Dockerfile+++ b/extras/docker/apache/Dockerfile@@ -78,10 +78,7 @@ RUN chmod o+w -R ~/db/ \&& ln -s /home/wger/static/CACHE /home/wger/src/CACHE \&& chmod g+w /home/wger/static/CACHE \&& sed -i "/^MEDIA_ROOT/c\MEDIA_ROOT='\/home\/wger\/media'" settings.py \- && python manage.py download-exercise-images \- && chmod -R g+w ~/media \- && echo STATIC_ROOT=\'/home/wger/static\' >> settings.py \- && python manage.py collectstatic --noinput+ && echo STATIC_ROOT=\'/home/wger/static\' >> settings.pyUSER rootdiff --git a/extras/docker/apache/entrypoint.sh b/extras/docker/apache/entrypoint.shindex 46a5877d6..b6d03e858 100755--- a/extras/docker/apache/entrypoint.sh+++ b/extras/docker/apache/entrypoint.sh@@ -2,6 +2,11 @@/home/wger/venvwrapper migrate+if [ "${DOWNLOAD_IMGS}" = "TRUE" ]; then+ /home/wger/venvwrapper download-exercise-images+ chmod -R g+w ~wger/media+fi+if [ "${USE_S3}" = "TRUE" ]; then/home/wger/venvwrapper collectstatic --no-input/home/wger/venvwrapper compress --force