gunicorn/tests/docker/http2/docker-compose.yml
Benoit Chesneau 780e2cf055 Add HTTP/2 tests
Unit tests for HTTP/2 implementation:
- test_http2_stream.py: Stream state management tests
- test_http2_request.py: Request interface tests
- test_http2_connection.py: Connection handling tests
- test_http2_async_connection.py: Async connection tests
- test_http2_config.py: Configuration tests
- test_http2_alpn.py: ALPN negotiation tests
- test_http2_errors.py: Error handling tests
- test_http2_integration.py: Integration tests

Docker integration tests:
- Full HTTP/2 testing environment with nginx proxy
- Direct connection tests and proxy tests
- Concurrent stream tests
- Protocol behavior tests
- Error handling tests
- Header handling tests
- Performance tests
2026-01-27 09:57:32 +01:00

43 lines
1.1 KiB
YAML

services:
gunicorn-h2:
build:
context: ../../../
dockerfile: tests/docker/http2/Dockerfile.gunicorn
ports:
- "8443:8443"
volumes:
- ./certs:/certs:ro
- ./app.py:/app/app.py:ro
environment:
- GUNICORN_CERTFILE=/certs/server.crt
- GUNICORN_KEYFILE=/certs/server.key
healthcheck:
test: ["CMD", "python", "-c", "import ssl,socket; s=socket.socket(); s.settimeout(1); ctx=ssl.create_default_context(); ctx.check_hostname=False; ctx.verify_mode=ssl.CERT_NONE; ss=ctx.wrap_socket(s,server_hostname='localhost'); ss.connect(('localhost',8443)); ss.close()"]
interval: 2s
timeout: 5s
retries: 15
start_period: 5s
nginx-h2:
build:
context: .
dockerfile: Dockerfile.nginx
ports:
- "8444:8444"
volumes:
- ./certs:/certs:ro
- ./nginx.conf:/etc/nginx/nginx.conf:ro
depends_on:
gunicorn-h2:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-k", "-f", "https://localhost:8444/health"]
interval: 2s
timeout: 5s
retries: 15
start_period: 5s
networks:
default:
driver: bridge