mirror of
https://github.com/tubearchivist/tubearchivist-frontend.git
synced 2024-11-16 17:10:12 +00:00
25 lines
646 B
Bash
25 lines
646 B
Bash
#!/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 2 min
|
|
echo "failed to connect to elastic search, exiting..."
|
|
exit 1
|
|
fi
|
|
sleep 10
|
|
done
|
|
|
|
python manage.py makemigrations
|
|
python manage.py migrate
|
|
export DJANGO_SUPERUSER_PASSWORD=$TA_PASSWORD && \
|
|
python manage.py createsuperuser --noinput --name "$TA_USERNAME"
|
|
|
|
python manage.py collectstatic --noinput -c
|
|
nginx &
|
|
celery -A home.tasks worker --loglevel=INFO &
|
|
uwsgi --ini uwsgi.ini
|