ConceptPortal-public/rsconcept/backend/entrypoint.sh

19 lines
398 B
Bash
Raw Normal View History

2023-07-15 17:46:19 +03:00
# 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
2023-08-05 15:45:18 +03:00
cd $APP_HOME
python3.12 $APP_HOME/manage.py collectstatic --noinput --clear
python3.12 $APP_HOME/manage.py migrate
2023-07-15 17:46:19 +03:00
# Execute given input command
exec "$@"