idhub entrypoint: add gunicorn
This commit is contained in:
parent
9a14a3f3da
commit
cca98c1cf8
|
@ -99,9 +99,14 @@ config_oidc4vp() {
|
|||
done
|
||||
}
|
||||
|
||||
main() {
|
||||
idhub_dir='/opt/idhub'
|
||||
cd "${idhub_dir}"
|
||||
runserver() {
|
||||
if [ ! "${DEBUG:-}" = "true" ]; then
|
||||
./manage.py collectstatic
|
||||
gunicorn --access-logfile - --error-logfile - --workers 4 -b :${PORT} trustchain_idhub.wsgi:application
|
||||
else
|
||||
./manage.py runserver 0.0.0.0:${PORT}
|
||||
fi
|
||||
}
|
||||
|
||||
check_app_is_there() {
|
||||
if [ ! -f "./manage.py" ]; then
|
||||
|
@ -119,11 +124,7 @@ main() {
|
|||
|
||||
inject_env_vars
|
||||
|
||||
if [ ! "${DEBUG:-}" = "true" ]; then
|
||||
./manage.py collectstatic
|
||||
fi
|
||||
|
||||
./manage.py runserver 0.0.0.0:${PORT}
|
||||
runserver
|
||||
}
|
||||
|
||||
main "${@}"
|
||||
|
|
Reference in a new issue