python - How to integrate a --worker-class of gunicorn in supervisor config setting? -
i have configured supervisor on server this:
[program:myproject] command = /home/mydir/myproj/venv/bin/python /home/mydir/myproj/venv/bin/gunicorn manage:app -b <ip_address>:8000 directory = /home/mydir
i have installed gevent on virtual environment don't know how can implement on supervisor command
variable, can run manually through terminal this:
gunicorn manage:app -b <ip_address>:8000 --worker-class gevent
i tried include path when call gevent in supervisor command python , gunicorn, it's not working, honestly, don't know what's correct directory/file execute gevent , not sure if correct way execute worker class in supervisor. running on ubuntu v14.04
anyone?thanks
already made solution this. not 100% sure if correct, after searching hundred times, came working solution :)
got here, i've created gunicorn.conf.py file on project directory containing:
worker_class = 'gevent'
and integrated file on supervisor config setting:
[program:myproject] command = /home/mydir/myproj/venv/bin/python /home/mydir/myproj/venv/bin/gunicorn -c /home/mydir/myproj/gunicorn.conf.py manage:app -b <ip_address>:8000 directory = /home/mydir
and start running supervisor:
sudo supervisorctl start <my_project>
and poof! it's working!
Comments
Post a Comment