Python: supervisor configure file to execute gunicorn
<p>Newbie to python, I use Flask+gunicorn+supervisor+ngnix to run a server. And each is set well, my problem is I can not use supervisor to make gunicorn to run some execution.<br>
Below is hierarchy of file:</p>

<pre><code>.  
├── logs  
│   ├── access.log  
│   └── gunicorn_supervisor.log  
└── tserver  
    ├── bin  
    ├── build  
    ├── flasky   
    │   ├── @   
    │   ├── app  
    │   ├── hello.py  
    │   ├── LICENSE   
    │   └── README.md    
    ├── gunicorn.conf  
    ├── include  
    ├── lib  
    ├── local  
    └── pip-selfcheck.json   
</code></pre>

<p><code>tserver</code> is created by virtualenv.</p>

<p>/etc/supervisor/conf.d/tserver.conf :   </p>

<pre><code>[program:tserver]
command=/home/jason/tserver/bin/gunicorn hello:app -c /home/jason/tserver/gunicorn.conf
directory=/home/jason/tserver/
user=jason
autostart=true
autorestart=true
stdout_logfile=/home/jason/logs/gunicorn_supervisor.log
</code></pre>

<p>My purpose is to let supervisor to make gunicorn run the <code>hello.py</code>, but it doesn't work. I use <code>sudo supervisor status</code> to see the status and found:  </p>

<pre><code>tserver      FATAL      Exited too quickly (process log may have details) 
</code></pre>

<p>I got a strong feeling that the problem must comes from the <code>tserver.conf</code>, especially the <code>command</code>.  </p>

<p>Look the file, the hello.py is in the file named "flasky", So<code>command=/home/jason/tserver/bin/gunicorn hello:app -c /home/jason/tserver/gunicorn.conf</code> I think has some problem for the path. But <code>command=/home/jason/tserver/bin/gunicorn ./hello:app -c /home/jason/tserver/gunicorn.conf</code> still doesn't work.  </p>

<p>And I think it's a very stupid question for experienced ones, but as a newbie I am stuck, So please give me a detail solution, since I have read the relevant documents and did not get it. Thanks for your favor.</p>