gunicorn/tests/docker/asgi_compliance/docker-compose.yml
Benoit Chesneau 0885005b08 fix(tests): correct assertions in ASGI compliance tests
- Fix path expectation in test_scope_path_preserved (router strips /http prefix)
- Fix lifespan state check to use scope_state instead of module_state
- Add tolerance for partial failures in proxy concurrent test
- Add retry logic with proper assertions in HTTPS proxy FastAPI test
2026-02-02 14:04:26 +01:00

65 lines
1.8 KiB
YAML

services:
gunicorn-asgi:
build:
context: ../../../
dockerfile: tests/docker/asgi_compliance/Dockerfile.gunicorn
ports:
- "8000:8000" # HTTP
- "8443:8443" # HTTPS
volumes:
- ./certs:/certs:ro
- ./apps:/app/apps:ro
environment:
- GUNICORN_CERTFILE=/certs/server.crt
- GUNICORN_KEYFILE=/certs/server.key
healthcheck:
test: ["CMD", "python", "-c", "import socket; s=socket.socket(); s.settimeout(2); s.connect(('localhost',8000)); s.close()"]
interval: 2s
timeout: 5s
retries: 15
start_period: 5s
gunicorn-asgi-ssl:
build:
context: ../../../
dockerfile: tests/docker/asgi_compliance/Dockerfile.gunicorn
ports:
- "8445:8443"
volumes:
- ./certs:/certs:ro
- ./apps:/app/apps:ro
environment:
- GUNICORN_CERTFILE=/certs/server.crt
- GUNICORN_KEYFILE=/certs/server.key
- USE_SSL=1
healthcheck:
test: ["CMD", "python", "-c", "import ssl,socket; s=socket.socket(); s.settimeout(2); 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-proxy:
build:
context: .
dockerfile: Dockerfile.nginx
ports:
- "8080:8080" # HTTP proxy
- "8444:8444" # HTTPS proxy
volumes:
- ./certs:/certs:ro
- ./nginx.conf:/etc/nginx/nginx.conf:ro
depends_on:
gunicorn-asgi:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/health"]
interval: 2s
timeout: 5s
retries: 15
start_period: 5s
networks:
default:
driver: bridge