#35 use gunicorn for running the backend in production
This commit is contained in:
20
patches/taxhub/gunicorn_start.sh
Executable file
20
patches/taxhub/gunicorn_start.sh
Executable file
@@ -0,0 +1,20 @@
|
||||
#!/bin/bash
|
||||
|
||||
FLASKDIR=$(readlink -e "${0%/*}")
|
||||
APP_DIR="$(dirname "$FLASKDIR")"
|
||||
|
||||
echo "Starting $app_name"
|
||||
echo "$FLASKDIR"
|
||||
echo "$APP_DIR"
|
||||
|
||||
. "$APP_DIR"/settings.ini
|
||||
|
||||
# # activate the virtualenv
|
||||
# cd $FLASKDIR/$venv_dir
|
||||
# source bin/activate
|
||||
|
||||
# export PYTHONPATH=$FLASKDIR:$PYTHONPATH
|
||||
|
||||
|
||||
# Start your unicorn
|
||||
exec gunicorn server:app --access-logfile $APP_DIR/var/log/taxhub-access.log --pid="${app_name}.pid" --error-log $APP_DIR/var/log/taxhub-errors.log -w "${gun_num_workers}" -b "${gun_host}:${gun_port}" -n "${app_name}"
|
Reference in New Issue
Block a user