feat: ADRF async views (phase1) + native async serializers (phase2) + async cache infra
This commit is contained in:
+6
-2
@@ -21,7 +21,11 @@ COPY . .
|
||||
# 暴露端口
|
||||
EXPOSE 8000
|
||||
|
||||
# 启动命令 - 运行迁移并启动服务
|
||||
# 启动命令 - 运行迁移、收集静态文件,并使用 Granian(Rust) 以 ASGI 接口启动
|
||||
# Granian 性能远超 Daphne,原生支持 ASGI/WebSocket(Channels ProtocolTypeRouter)
|
||||
# 注意:ASGI 接口下 blocking-threads 必须为 1(Granian 限制),并发由事件循环承担
|
||||
CMD python manage.py migrate --noinput && \
|
||||
python manage.py collectstatic --noinput && \
|
||||
daphne -b 0.0.0.0 -p 8000 chunyu_project.asgi:application
|
||||
granian --interface asgi --host 0.0.0.0 --port 8000 \
|
||||
--workers 2 --backlog 2048 \
|
||||
--log-level info chunyu_project.asgi:application
|
||||
|
||||
Reference in New Issue
Block a user