kopia lustrzana https://github.com/OpenDroneMap/WebODM
Modified start.sh to always perform migrations. This is useful when using docker-compose, since the database gets destroyed often with docker's workflow
rodzic
0759c6d441
commit
00801dd01f
15
start.sh
15
start.sh
|
@ -1,12 +1,11 @@
|
|||
#!/bin/bash
|
||||
if ! [ -a .initialized ]; then
|
||||
echo First run, migrating...
|
||||
python manage.py makemigrations
|
||||
python manage.py migrate
|
||||
echo Running migrations
|
||||
python manage.py makemigrations
|
||||
python manage.py migrate
|
||||
|
||||
echo Creating default superuser...
|
||||
echo "from django.contrib.auth.models import User; User.objects.create_superuser('admin', 'admin@example.com', 'admin')" | python manage.py shell
|
||||
touch .initialized
|
||||
fi
|
||||
echo Creating default superuser...
|
||||
|
||||
# This will fail if the user is a duplicate
|
||||
echo "from django.contrib.auth.models import User; User.objects.create_superuser('admin', 'admin@example.com', 'admin')" | python manage.py shell
|
||||
|
||||
python manage.py runserver 0.0.0.0:8000
|
Ładowanie…
Reference in New Issue