2
0
Fork 0
shiftregister/entrypoint.sh

22 lines
308 B
Bash
Executable File

#!/bin/sh
set -e
ROLE="${ROLE:-app}"
case "$ROLE" in
app)
rm -rf static/*
python manage.py collectstatic
python manage.py migrate
gunicorn shiftregister.wsgi -b 0.0.0.0:8000 "$@"
;;
worker)
celery -A shiftregister worker -B
;;
*)
echo 'unknown role "'"$ROLE"'"' >&2
sleep 1
;;
esac