2019-08-23 08:47:19 -07:00
|
|
|
#!/bin/bash
|
|
|
|
|
2019-12-03 18:26:59 -08:00
|
|
|
addrport="0.0.0.0:8000"
|
|
|
|
|
2019-11-26 02:44:14 -08:00
|
|
|
# Wait for backend connection
|
2019-08-23 08:47:19 -07:00
|
|
|
/bin/bash wait-for-it.sh
|
|
|
|
|
2020-01-13 08:26:37 -08:00
|
|
|
# Kill any existing celery processes
|
|
|
|
pkill -9 -f celery
|
|
|
|
rm -f *.pid
|
|
|
|
|
2019-08-23 08:47:19 -07:00
|
|
|
## Needs a connection to a DB so migrations go here
|
|
|
|
python3 manage.py makemigrations website
|
|
|
|
python3 manage.py migrate
|
2019-10-08 04:21:08 -07:00
|
|
|
python3 manage.py createuser admin $ADMIN_PASSWORD --superuser
|
|
|
|
python3 manage.py startcelery
|
2019-12-03 18:26:59 -08:00
|
|
|
|
|
|
|
echo ""
|
|
|
|
echo "-=------------------------------------------------------"
|
|
|
|
echo " Starting the web server on '$addrport'..."
|
|
|
|
echo "-=------------------------------------------------------"
|
|
|
|
python3 manage.py runserver "$addrport"
|