#!/usr/bin/env bash

set -Eeuo pipefail

#echo "Waiting for postgres..."

#while ! nc -z db 5432; do
#  sleep 0.1
#done

#echo "PostgreSQL started"

pushd /code/platform_web/

python manage.py migrate
python manage.py collectstatic --noinput --clear

popd

exec "$@"