mirror of
https://github.com/frappe/gunicorn.git
synced 2026-07-01 18:21:30 +08:00
- Add Dockerfile and docker-compose.yml for running examples in containers - Add test_integration.py for HTTP-level integration testing - Update test_worker_integration.py to use MockWriter for handle_request - Use integer request IDs for binary protocol compatibility - Add GUNICORN_BIND env var support in gunicorn_conf.py for Docker
26 lines
573 B
Docker
26 lines
573 B
Docker
#
|
|
# This file is part of gunicorn released under the MIT license.
|
|
# See the NOTICE for more information.
|
|
|
|
FROM python:3.12-slim
|
|
|
|
WORKDIR /app
|
|
|
|
# Copy gunicorn source
|
|
COPY . /app/gunicorn-src
|
|
|
|
# Install gunicorn and dependencies
|
|
# setproctitle is needed for process title changes
|
|
RUN pip install --no-cache-dir /app/gunicorn-src setproctitle
|
|
|
|
# Copy example files
|
|
COPY examples/dirty_example/ /app/examples/dirty_example/
|
|
|
|
WORKDIR /app
|
|
|
|
# Expose the port
|
|
EXPOSE 8000
|
|
|
|
# Default command - run the example tests
|
|
CMD ["python", "-m", "pytest", "-v", "examples/dirty_example/"]
|