Skip to content

Commit

Permalink
migrate if env variable is set
Browse files Browse the repository at this point in the history
  • Loading branch information
csae8092 committed Nov 5, 2021
1 parent bd6d69c commit 1703dc7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion start-server.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
#!/usr/bin/env bash
# start-server.sh
echo "hallo"
echo "Hallo von Nabucco"
if [ -n "$MIGRATE" ] ; then
(echo "making migrations and running them"
python djangobaseproject/manage.py migrate --no-input)
fi
if [ -n "$DJANGO_SUPERUSER_USERNAME" ] && [ -n "$DJANGO_SUPERUSER_PASSWORD" ] ; then
(echo "creating superuser ${DJANGO_SUPERUSER_USERNAME}" && python djangobaseproject/manage.py createsuperuser --no-input --noinput --email '[email protected]')
fi
Expand Down

0 comments on commit 1703dc7

Please sign in to comment.