python简单实用gunicorn部署

linux 安装 pyuthon

 

安装   pip install gunicorn

 

manage.py 文件

from app import create_app

app = create_app()

if __name__ == '__main__':
    app.run()

 

运行命令

gunicorn -D -b 0.0.0.0:12100 manage:app

-D 后台运行

 

gunicorn --access-logfile access.log --error-logfile error.log -D -b :12100 manage:app

access日志  

错误日志

gunicorn --timeout 20 --access-logfile access.log --error-logfile error.log -D -b :12100 manage:app


官网

http://docs.gunicorn.org/en/stable/run.html

 

https://www.jianshu.com/p/260f18aa5462

 

posted @ 2018-12-03 23:13  AngDH  阅读(3766)  评论(0编辑  收藏  举报