Skip to content

armgit / wger

Public Imported from GitHub
0

Self hosted FLOSS fitness/workout, nutrition and weight tracker

Allow to sync exercises and their images on startup

Roland Geider91884d3408cd
diff --git a/extras/docker/development/entrypoint.sh b/extras/docker/development/entrypoint.sh
index a922dc210..c64dcb5d8 100644
--- a/extras/docker/development/entrypoint.sh
+++ b/extras/docker/development/entrypoint.sh
@@ -45,6 +45,20 @@ then
python3 manage.py migrate
fi
+# Sync exercises
+if [[ "$SYNC_EXERCISES_ON_STARTUP" == "True" ]];
+then
+ echo "Synchronizing exercises"
+ python3 manage.py sync-exercises
+fi
+
+# Download exercise images
+if [[ "$DOWNLOAD_EXERCISE_IMAGES_ON_STARTUP" == "True" ]];
+then
+ echo "Downloading exercise images"
+ python3 manage.py download-exercise-images
+fi
+
# Run the server
if [[ "$WGER_USE_GUNICORN" == "True" ]];
then