Add entrypoint script
parent
5077333ff1
commit
94b5638982
@ -0,0 +1,20 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
ROLE="${ROLE:-app}"
|
||||
|
||||
case "$ROLE" in
|
||||
app)
|
||||
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
|
Loading…
Reference in New Issue