12 lines
347 B
Bash
Executable File
12 lines
347 B
Bash
Executable File
#!/bin/sh
|
|
set -e
|
|
|
|
until nc -z "$POSTGRES_HOST" "$POSTGRES_PORT"; do
|
|
echo "Waiting for postgres at $POSTGRES_HOST:$POSTGRES_PORT..."
|
|
sleep 1
|
|
done
|
|
|
|
python manage.py migrate --noinput
|
|
python manage.py collectstatic --noinput
|
|
exec gunicorn config.wsgi:application --bind 0.0.0.0:8000 --workers 3 --timeout 120 --access-logfile - --error-logfile -
|