ottertune/docker/start.sh

23 lines
602 B
Bash
Raw Normal View History

2019-08-23 08:47:19 -07:00
#!/bin/bash
addrport="0.0.0.0:8000"
# Wait for backend connection
2019-08-23 08:47:19 -07:00
/bin/bash wait-for-it.sh
# 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
python3 manage.py createuser admin $ADMIN_PASSWORD --superuser
python3 manage.py startcelery
echo ""
echo "-=------------------------------------------------------"
echo " Starting the web server on '$addrport'..."
echo "-=------------------------------------------------------"
python3 manage.py runserver "$addrport"