#!/bin/sh # Apply migrations, then hand over to gunicorn. # # Workers/threads are modest on purpose: background jobs (downloads, scans) # live in daemon threads inside the worker and are reaped if a worker dies. set -e python manage.py migrate --noinput exec gunicorn config.wsgi:application \ --bind 0.0.0.0:8000 \ --workers "${GUNICORN_WORKERS:-2}" \ --threads "${GUNICORN_THREADS:-4}" \ --timeout "${GUNICORN_TIMEOUT:-120}" \ --access-logfile - \ --error-logfile -