Allow to automatically perform database migrations

See https://github.com/wger-project/docker/issues/15
This commit is contained in:
Roland Geider
2022-04-23 09:22:40 +02:00
parent a22a6ca0d1
commit fcbaebec71

View File

@@ -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