upstream video_analysis_api { # With host networking, the API binds host:8007 server 127.0.0.1:8007; keepalive 32; } server { listen 80; server_name _; # Timeouts (video processing + vLLM may take time) proxy_connect_timeout 60s; proxy_send_timeout 300s; proxy_read_timeout 600s; # Allow large video uploads client_max_body_size 500M; # Disable buffering for large uploads / streaming proxy_buffering off; proxy_request_buffering off; location /health { access_log off; proxy_pass http://video_analysis_api/health; proxy_http_version 1.1; proxy_set_header Host $host; proxy_set_header Connection ""; } location / { proxy_pass http://video_analysis_api; proxy_http_version 1.1; # Forward client info proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; # Streaming friendliness (even if not currently used) proxy_set_header Connection ""; proxy_set_header X-Accel-Buffering no; proxy_cache off; chunked_transfer_encoding off; # Request correlation proxy_set_header X-Request-ID $request_id; } }