2
0
Fork 0
shiftregister/entrypoint.sh

23 lines
338 B
Bash
Raw Normal View History

2022-04-18 22:48:36 +02:00
#!/bin/sh
set -e
ROLE="${ROLE:-app}"
case "$ROLE" in
app)
2022-04-18 23:03:55 +02:00
rm -rf static/*
2022-04-18 22:48:36 +02:00
python manage.py collectstatic
python manage.py migrate
2022-04-29 00:20:50 +02:00
python manage.py importhtml
2022-04-18 22:48:36 +02:00
gunicorn shiftregister.wsgi -b 0.0.0.0:8000 "$@"
;;
worker)
celery -A shiftregister worker -B
;;
*)
echo 'unknown role "'"$ROLE"'"' >&2
sleep 1
;;
esac