python簡單實用gunicorn部署

linux 安裝 pyuthonhtml

 

安裝   pip install gunicornlinux

 

manage.py 文件app

from app import create_app

app = create_app()

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

 

運行命令spa

gunicorn -D -b 0.0.0.0:12100 manage:app日誌

-D 後臺運行code

 

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

access日誌  blog

錯誤日誌ip

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


官網

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

 

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

相關文章
相關標籤/搜索