小编Joh*_*ohn的帖子

如何同时运行Daphne和Gunicorn?

我正在使用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
Run Code Online (Sandbox Code Playgroud)

PS:我拆分了locationof//ws/forgunicorndaphnein nginx.conf

django nginx gunicorn daphne

3
推荐指数
1
解决办法
5858
查看次数

标签 统计

daphne ×1

django ×1

gunicorn ×1

nginx ×1