Deploy flask applications with gunicorn, how to deploy them with flask-script?

  1. my project only provides interfaces and no static files, so I just want to deploy it with gunicorn, but my project is managed by manager, and usually starts with python manger.py runserver-host 0.0.0.0. How can I start with gunicorn now?
  2. the code is as follows

      
    
Mar.04,2021

after installing pip install gunicorn (in the virtual environment, it can be omitted.
I used uwsgi, for a long time, but it didn't work all the time. After using gunicorn, I found that compared with uwsgi, it was not too easy.
then modify the configuration file default of nginx (modify the files managed by your project nginx)

server {
    listen 80;
    server_name 120.79.2.46;

    location / {
        proxy_pass http://127.0.0.1:8888;
        proxy_set_header Host $host;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    }

  }

then under the project directory, gunicorn-w 4-b 0.0.0.0 supervisor 8888 manage:app
if you want to facilitate management, it is recommended to use supervisor to manage the project

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b306c9-2bd1f.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b306c9-2bd1f.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?