| Oleksii Petrenko | 24f1f8f | 2020-06-26 18:09:43 +0300 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | |||||
| 3 | if [ "$DATABASE" = "postgres" ] | ||||
| 4 | then | ||||
| 5 | echo "Waiting for postgres..." | ||||
| 6 | |||||
| 7 | while ! nc -z $SQL_HOST $SQL_PORT; do | ||||
| 8 | sleep 0.1 | ||||
| 9 | done | ||||
| 10 | |||||
| 11 | echo "PostgreSQL started" | ||||
| 12 | fi | ||||
| 13 | |||||
| 14 | python manage.py migrate --noinput | ||||
| 15 | python manage.py collectstatic --noinput | ||||
| 16 | uwsgi --http :8000 --module testrail_bot.wsgi | ||||