entrypoint.sh 368 B

1234567891011121314151617181920
  1. #!/bin/bash
  2. if [ "$DATABASE" = "postgres" ]
  3. then
  4. echo "Waiting for postgres..."
  5. while ! nc -z $SQL_HOST $SQL_PORT; do
  6. sleep 0.1
  7. done
  8. echo "PostgreSQL started"
  9. else
  10. echo "la base de datos no es postgres: '$DATABASE'"
  11. fi
  12. python manage.py collectstatic --noinput
  13. nginx -g 'daemon off;' &
  14. python manage.py runserver 0.0.0.0:8000 --noreload