What is the correct way to leave gunicorn running?

前端 未结 9 1895
南方客
南方客 2020-12-23 13:48

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
相关标签:
9条回答
  • 2020-12-23 14:26

    Running hug api like this.

    --daemon is to keep the process in background.

    --access-logfile to keep request log

    --bind=< ip>:< port> Giving IP will allow to access from other systems(If proxy is not needed).

    gunicorn <pyscirpt_name>:__hug_wsgi__ --name  caassist -w 4 --access-logfile /var/logs/gunicorn/gunicorn_access.log --daemon --bind=<ip>:<port>
    
    0 讨论(0)
  • 2020-12-23 14:29

    use --daemon to the binding command of gunicorn. ex:

    gunicorn --bind 0.0.0.0:8001 your_project.wsgi --daemon
    
    0 讨论(0)
  • 2020-12-23 14:33

    Use --daemon option while running gunicorn. Example:

    gunicorn grand56.wsgi:application --name grand56 --workers 3 --user=root --group=root --bind=127.0.0.1:1001 --daemon

    0 讨论(0)
提交回复
热议问题