net/flask/entrypoint.sh

17 lines
224 B
Bash
Raw Normal View History

2022-02-03 17:27:25 -05:00
#!/bin/sh
if [ "$DATABASE" = "postgres" ]
then
echo "Waiting for postgres..."
while ! nc -z $SQL_HOST $SQL_PORT; do
sleep 0.1
done
echo "PostgreSQL started"
fi
python manage.py create_db
exec "$@"