entrypoint.sh 382 B

12345678910111213141516171819202122
  1. #!/bin/bash
  2. # Este es para K8S
  3. if [ "$DATABASE" = "postgres" ]
  4. then
  5. echo "Waiting for postgres..."
  6. while ! nc -z $SQL_HOST $SQL_PORT; do
  7. sleep 0.1
  8. done
  9. echo "PostgreSQL started"
  10. else
  11. echo "la base de datos no es postgres: '$DATABASE'"
  12. fi
  13. python manage.py collectstatic --noinput
  14. #python manage.py flush --no-input
  15. #python manage.py migrate
  16. exec "$@"