biommap/patches/taxhub/gunicorn_start.sh

21 lines
530 B
Bash
Raw Normal View History

#!/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}"