Skip to content

armgit / wger

Public Imported from GitHub
0

Self hosted FLOSS fitness/workout, nutrition and weight tracker

Allow to automatically perform database migrations

Roland Geiderfcbaebec71fd
diff --git a/extras/docker/development/entrypoint.sh b/extras/docker/development/entrypoint.sh
index 44fe02d5f..a922dc210 100644
--- a/extras/docker/development/entrypoint.sh
+++ b/extras/docker/development/entrypoint.sh
@@ -38,6 +38,13 @@ then
python3 manage.py collectstatic --no-input
fi
+# Perform database migrations
+if [[ "$DJANGO_PERFORM_MIGRATIONS" == "True" ]];
+then
+ echo "Performing database migrations"
+ python3 manage.py migrate
+fi
+
# Run the server
if [[ "$WGER_USE_GUNICORN" == "True" ]];
then