yum install supervisor

    出现
    unix:///var/run/supervisor/supervisor.sock no such file
    执行 启动 supervisor 若有错误会有提示
    sudo supervisord -c /etc/supervisord.conf

    如果是虚拟环境 需要 pip install 各自的 gunicorn 和 gevent !

    gunicorn 文档
    https://docs.gunicorn.org/en/stable/index.html

    示例

    1. [program:test_proj]
    2. directory=/home/test_proj/test_proj
    3. command = /root/.pyenv/versions/test_proj/bin/gunicorn -k gevent -w 1 -b 127.0.0.1:4108 --pythonpath=. --timeout=5 test_proj.wsgi:application
    4. environment=PATH="/root/.pyenv/versions/test_proj/bin:$PATH",TEST_PROJ_ENV=PRODUCT
    5. autostart=true
    6. autorestart=true
    7. stdout_logfile=/var/log/supervisor/test_proj/info.log
    8. stderr_logfile=/var/log/supervisor/test_proj/info.log
    9. loglevel=info