/note/tech

GunicornをFabric経由で操作する

GUNICORN=/usr/bin/gunicorn
ROOT=/your/app/path
PID=/var/run/gunicorn/your.pid
APP=run:app

if [ -f $PID ]; then rm $PID; fi
    cd $ROOT
    source venv/bin/activate
    exec $GUNICORN -c $ROOT/gunicorn.conf.py –pid=$PID $APP

ふむふむ