What is the correct way to leave gunicorn running?

flask, gunicorn, nginx, python

Solution

I'd look into something like Supervisor.

Very useful tutorial can be found here https://www.codingforentrepreneurs.com/blog/hello-linux-setup-gunicorn-and-supervisor/

Problem

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 ``` But when I logout of the server the gunicorn process exits? What is the correct way to make sure it stay running for Nginx to connect to, and restarts if it crashes?

Original source