uWSGI works as process but not as daemon

前端 未结 3 2005
北恋
北恋 2020-12-14 09:52

For my current flask deployment, I had to set up a uwsgi server. This is how I have created the uwsgi daemon:

sudo vim /etc/init/uwsgi.conf



        
3条回答
  •  天涯浪人
    2020-12-14 10:10

    As a single line running with daemon true command is

    gunicorn  app.wsgi:application -b 127.0.0.1:8000 --daemon
    

    bind your app with 127.0.0.1:8000 and --deamon force it to run as daemon

    but define a gunicorn_config.cfg file and run with -c flag is good practice

    for more:

    https://gunicorn-docs.readthedocs.org/en/develop/configure.html

提交回复
热议问题