24 lines
570 B
Bash
Executable File
24 lines
570 B
Bash
Executable File
#!/bin/sh
|
|
if [ "$DATABASE" = "postgres" ]; then
|
|
echo "Waiting for postgres..."
|
|
|
|
while ! nc -z $DATABASE_HOST $DATABASE_PORT; do
|
|
sleep 0.1
|
|
done
|
|
|
|
echo "PostgreSQL started"
|
|
fi
|
|
|
|
if false; then
|
|
# Make migrations and migrate the database.
|
|
echo "Making migrations and migrating the database"
|
|
python manage.py makemigrations --noinput
|
|
python manage.py migrate --noinput
|
|
echo "collecting static files"
|
|
python manage.py collectstatic --noinput
|
|
fi
|
|
|
|
#exec "$@"
|
|
|
|
gunicorn djangoproject.wsgi:application --bind 0.0.0.0:8000 --workers=4
|