#!/bin/bash if [ "$DATABASE" = "postgres" ] then echo "Waiting for postgres..." while ! nc -z $SQL_HOST $SQL_PORT; do sleep 0.1 done echo "PostgreSQL started" else echo "la base de datos no es postgres: '$DATABASE'" fi python manage.py collectstatic --noinput nginx -g 'daemon off;' & python manage.py runserver 0.0.0.0:8000 --noreload