To check whether the gunicorn package works as expected, just run the following command from inside our application folder:
$ gunicorn -w 4 -b 127.0.0.1:8000 my_app:app
After this, point your browser to http://127.0.0.1:8000/ to see the application's home page. Now, we can get started:
- Now, we need to do the same using Supervisor so that this runs as a daemon that will be controlled by Supervisor itself rather than through human intervention. First of all, we need a Supervisor configuration file. This can be achieved by running the following command from virtualenv. Supervisor, by default, looks for an etc folder that has a file named supervisord.conf. In system-wide installations, this folder is /etc/, and in virtualenv ...