net/flask/entrypoint.sh
2023-11-17 19:58:12 -05:00

15 lines
196 B
Bash
Executable file

#!/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
exec "$@"