github.com/pyroscope-io/pyroscope@v0.37.3-0.20230725203016-5f6947968bd0/examples/python/rideshare/django/app/entrypoint.sh (about)

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