Benoit Chesneau 8663740907
Add uWSGI protocol support to ASGI worker (#3467)
Add uWSGI protocol support to ASGI worker

- Implements AsyncUWSGIRequest class extending sync UWSGIRequest to reuse parsing logic with async I/O
- ASGI protocol handler selects between HTTP and uWSGI based on --protocol config option
- Allows gunicorn's ASGI worker to receive requests from nginx using uwsgi_pass directive
- Includes unit tests and Docker integration tests
2026-01-25 14:45:07 +01:00

19 lines
359 B
Docker

FROM python:3.11-slim
WORKDIR /build
# Copy gunicorn source
COPY . /build/
# Install gunicorn from source
RUN pip install --no-cache-dir -e .
# Copy test app
WORKDIR /app
COPY tests/docker/test_asgi_uwsgi/app.py /app/
# Expose uWSGI port
EXPOSE 8000
CMD ["gunicorn", "--worker-class", "asgi", "--protocol", "uwsgi", "--bind", "0.0.0.0:8000", "app:app"]