【发布时间】:2020-07-20 21:35:26
【问题描述】:
我正在使用django-channels,因此我需要使用daphne,但对于静态文件和其他我想使用gunicorn 的东西。我可以同时启动daphne 和gunicorn,但我不能同时启动它们。
我的问题是我应该同时启动它们还是有更好的选择? 如果应该我该怎么做?
这是我正在运行的服务器命令:
gunicorn app.wsgi:application --bind 0.0.0.0:8000 --reload && daphne -b 0.0.0.0 -p 8089 app.asgi:application
PS:
我将location 的/ 和/ws/ 拆分为gunicorn 和daphne 在nginx.conf 中。
【问题讨论】:
标签: django nginx gunicorn daphne