What is the correct way to leave gunicorn running?

前端 未结 9 2006
南方客
南方客 2020-12-23 13:48

I want to make a Flask+Nginx+Gunicorn deployment. I have Nginx setup and running and I run gunicorn as described in the docs:

gunicorn app:app
9条回答
  •  独厮守ぢ
    2020-12-23 14:10

    The key thing to note is that when you start the process from the command line it is a child of your terminal process (i. e. a child of bash). When you log out of the server your bash process is terminated - as are all its children.

    You'll want to use whatever system you have in place to manage nginx also manage gunicorn (anything from init.d or Upstart scripts to specialized application process monitors like Monit, Supervisor, Bluepill, Foreman, etc.)

提交回复
热议问题