当前位置:   article > 正文

Flask生产环境配置:Gunicorn+Nginx_nginx flask gunicorn 生产

nginx flask gunicorn 生产

Flask生产环境配置:Gunicorn+Nginx

Our first step will be to install all of the pieces that we need from the repositories. We will install pip, the Python package manager, in order to install and manage our Python components. We will also get the Python development files needed to build some of the Gunicorn components. We’ll install Nginx now as well.

sudo apt-get update
sudo apt-get install python-pip python-dev nginx
sudo pip install virtualenv
  • 1
  • 2
  • 3

Create a Python Virtual Environment

Next, we’ll set up a virtual environment in order to isolate our Flask application from the other Python files on the system.work inside the flask project dirctory.

sudo pip install virtualenv
source myprojectenv/bin/activate
pip install gunicorn flask
  • 1
  • 2
  • 3

Create the WSGI Entry Poi

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/AllinToyou/article/detail/711658
推荐阅读
相关标签
  

闽ICP备14008679号