Files
andros 80a0cebb63 Switch to Uvicorn and automate benchmark with Playwright in Docker
Server: replace Daphne with Uvicorn across Dockerfile, compose.yaml,
requirements.txt and INSTALLED_APPS. Uvicorn with the websockets worker
is noticeably faster for the pure-Python frameworks in this repo.

Benchmark: rewrite run_performance_tests.py as a real Playwright-driven
harness. Add a bench service (Dockerfile.bench + compose profile) that
runs headless Chromium against the web container, wipes the DB between
implementations via /_bench/clear/, discards two warmup iterations, then
measures 10 real iterations per framework. HTTP bodies are captured via
response.body(); WebSocket frames via page.on("websocket").

Visualization: new generate_plotly_plots.py emits the four comparison
PNGs with Plotly + Kaleido. The stale compile_performance_data.py
(hard-coded fake data) and the matplotlib script it fed are removed.

Cleanup: .gitignore now excludes performance_results_*.csv and logs/;
prior measurement CSVs and obsolete plot variants have been deleted.

README: describe the new Docker-only workflow and drop the outdated
manual-DevTools section.
2026-04-14 09:40:15 +02:00

16 lines
310 B
Docker

FROM python:3.12-slim
ENV PYTHONUNBUFFERED=1
ENV PYTHONDONTWRITEBYTECODE=1
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY . .
RUN chmod +x /app/manage.py
CMD ["uvicorn", "config.asgi:application", "--host", "0.0.0.0", "--port", "8000", "--ws", "websockets"]