Benoit Chesneau cc39ed922e examples(dirty): add streaming chat demo with SSE
Add a lightweight chat simulator demonstrating dirty worker streaming:
- Token-by-token SSE streaming via async generators
- FastAPI endpoint with browser UI
- Multiple canned responses based on keywords
- Docker deployment with docker-compose
- Integration tests for SSE protocol

Update docs/content/dirty.md to link to both examples.
2026-01-25 10:26:12 +01:00

21 lines
383 B
Docker

FROM python:3.12-slim
WORKDIR /app
# Install dependencies
RUN pip install --no-cache-dir \
fastapi \
pydantic
# Copy gunicorn source
COPY . /app/gunicorn-src
RUN pip install /app/gunicorn-src
# Copy app
COPY examples/streaming_chat /app/streaming_chat
ENV PYTHONPATH=/app
EXPOSE 8000
CMD ["gunicorn", "streaming_chat.main:app", "-c", "streaming_chat/gunicorn_conf.py"]