mirror of
https://github.com/IRBorisov/ConceptPortal.git
synced 2025-06-26 21:10:38 +03:00
20 lines
432 B
Bash
20 lines
432 B
Bash
# Before doing anything wait for database to come online
|
|
if [ "$DB_ENGINE" = "django.db.backends.postgresql_psycopg2" ]
|
|
then
|
|
echo "Waiting DB..."
|
|
|
|
while ! nc -z $DB_HOST $DB_PORT;
|
|
do
|
|
sleep 0.1
|
|
done
|
|
|
|
echo "Ready!"
|
|
fi
|
|
|
|
cd $APP_HOME
|
|
python $APP_HOME/manage.py collectstatic --noinput --clear
|
|
python $APP_HOME/manage.py makemigrations
|
|
python $APP_HOME/manage.py migrate
|
|
|
|
# Execute given input command
|
|
exec "$@" |