entrypoint-ppc-dev.sh 332 Bytes
#!/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

python3 collector/manage.py makemigrations --noinput
python3 collector/manage.py migrate
python3 collector/manage.py load_ppc_dev_data

exec "$@"