-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathnginx.conf
More file actions
35 lines (29 loc) · 955 Bytes
/
Copy pathnginx.conf
File metadata and controls
35 lines (29 loc) · 955 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
server {
listen 80;
# Allow large file uploads (PDFs can be several MB)
client_max_body_size 50M;
# Docker's internal DNS resolver
resolver 127.0.0.11 valid=10s;
resolver_timeout 5s;
# Serve static files
location / {
root /usr/share/nginx/html;
index index.html index.htm;
try_files $uri $uri/ /index.html;
}
# Proxy API requests to backend
location /api {
set $backend_upstream http://backend:3001;
proxy_pass $backend_upstream;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
# Allow large request bodies for file uploads
client_max_body_size 50M;
# Timeouts for long-running LLM requests
proxy_read_timeout 300s;
proxy_connect_timeout 75s;
}
}