entrypoint.sh 362 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. #python manage.py flush --no-input
  14. #python manage.py migrate
  15. exec "$@"