2
Systemd和Gunicorn需要某種作爲最後arg的以ExecStart
一個WSGI文件:http://docs.gunicorn.org/en/latest/deploy.html?highlight=ExecStart#systemd如何在沒有WSGI的情況下爲Gunicorn配置ExecStart?
使用Django,這是主要的模塊爲wsgi.py
:
ExecStart=/home/admin/django/bin/gunicorn --config /home/admin/src/gunicorn.py --bind unix:/tmp/api.sock myapp.wsgi
但這個文件顯然不會在使用Sanic和uvloop時存在(我相信新協議被稱爲ASGI)。我試圖將其代入app.py
這勿庸置疑沒有工作:
ExecStart=/home/admin/sanic/bin/gunicorn --config /home/admin/src/gunicorn.py --bind unix:/tmp/api.sock myapp.app
如何把這個參數使用中信高科時進行配置?