Skip to content

armgit / wger

Public Imported from GitHub
0

Self hosted FLOSS fitness/workout, nutrition and weight tracker

Add flag to allow controlling whether static assets are cleared first

Roland Geiderd87ac7e18532
diff --git a/extras/docker/development/entrypoint.sh b/extras/docker/development/entrypoint.sh
index e821009c0..3d9683b84 100644
--- a/extras/docker/development/entrypoint.sh
+++ b/extras/docker/development/entrypoint.sh
@@ -24,10 +24,16 @@ fi
wger bootstrap
# Collect static files
+if [ "$DJANGO_CLEAR_STATIC_FIRST" == "False" ]; then
+ clear=""
+else
+ clear="--clear"
+fi
+
if [[ "$DJANGO_DEBUG" == "False" ]];
then
echo "Running in production mode, running collectstatic now"
- python3 manage.py collectstatic --no-input --clear
+ python3 manage.py collectstatic --no-input $clear
fi
# Perform database migrations