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
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.)