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

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM