entrypoint.sh 257 B

1234567891011121314151617
  1. #!/bin/sh
  2. if [ "$DATABASE" = "postgres" ]
  3. then
  4. echo "Waiting for postgres..."
  5. while ! nc -z $SQL_HOST $SQL_PORT; do
  6. sleep 0.1
  7. done
  8. echo "PostgreSQL started"
  9. fi
  10. # python manage.py flush --no-input
  11. python manage.py migrate
  12. exec "$@"