python简单实用gunicorn部署

Posted AngDH

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了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 --config=config.py manage:app    

带配置文件的启动


官网

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

 

以上是关于python简单实用gunicorn部署的主要内容,如果未能解决你的问题,请参考以下文章