2021-09-05 17:10:14 +00:00
|
|
|
#!/bin/bash
|
|
|
|
# startup script inside the container for tubearchivist
|
|
|
|
|
|
|
|
counter=0
|
|
|
|
until curl "$ES_URL" -fs; do
|
|
|
|
echo "waiting for elastic search to start"
|
|
|
|
counter=$((counter+1))
|
|
|
|
if [[ $counter -eq 12 ]]; then
|
|
|
|
# fail after 1 min
|
|
|
|
echo "failed to connect to elastic search, exiting..."
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
sleep 5
|
|
|
|
done
|
|
|
|
|
|
|
|
python manage.py migrate
|
2021-09-16 14:59:36 +00:00
|
|
|
python manage.py collectstatic --noinput -c
|
2021-09-05 17:10:14 +00:00
|
|
|
nginx &
|
2021-09-13 15:18:03 +00:00
|
|
|
celery -A home.tasks worker --loglevel=INFO &
|
2021-09-05 17:10:14 +00:00
|
|
|
uwsgi --ini uwsgi.ini
|