Files
test_OgureNG/backend-django/entrypoint.sh
2022-11-08 21:19:51 +01:00

17 lines
255 B
Bash

#!/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 flush --no-input
python manage.py migrate
exec "$@"