Advertisement
izznogooood

Untitled

Aug 16th, 2019
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.33 KB | None | 0 0
  1. #!/usr/bin/env bash
  2.  
  3. echo "Waiting for postgres..."
  4. while ! nc -z $SQL_HOST $SQL_PORT; do
  5.   sleep 0.1
  6. done
  7. echo "PostgreSQL started"
  8.  
  9. python3 manage.py makemigrations
  10. python3 manage.py migrate
  11.  
  12. echo "Creating superuser"
  13. echo 'import createsuperuser' | python manage.py shell
  14.  
  15.  
  16. python3 manage.py runserver 0.0.0.0:5000
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement