init
This commit is contained in:
17
backend-django/entrypoint.sh
Normal file
17
backend-django/entrypoint.sh
Normal file
@@ -0,0 +1,17 @@
|
||||
#!/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 flush --no-input
|
||||
python manage.py migrate
|
||||
|
||||
exec "$@"
|
||||
Reference in New Issue
Block a user