22 lines
550 B
Bash
22 lines
550 B
Bash
#!/bin/bash
|
|
|
|
set -o errexit
|
|
set -o pipefail
|
|
set -o nounset
|
|
|
|
python /app/manage.py collectstatic --no-input --no-post-process
|
|
|
|
|
|
if [ -z "${IT_RESET_SCHEMA}" ]; then
|
|
echo "IT_RESET_SCHEMA is not set, skipping schema reset"
|
|
python /app/manage.py migrate --no-input
|
|
else
|
|
echo "IT_RESET_SCHEMA is set, resetting schema"
|
|
python /app/manage.py reset_schema --no-input
|
|
fi
|
|
|
|
python /app/manage.py collectstatic --no-input --no-post-process
|
|
|
|
|
|
/usr/local/bin/gunicorn config.asgi --bind 0.0.0.0:7555 --chdir=/app -k uvicorn.workers.UvicornWorker
|