tldtest.net/entrypoint.sh

19 lines
331 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
python manage.py makemigrations # Make migrations
python manage.py migrate # Apply database migrations
python manage.py collectstatic
exec "$@"