35 lines
1020 B
Nginx Configuration File
35 lines
1020 B
Nginx Configuration File
server {
|
|
listen 80;
|
|
server_name localhost;
|
|
|
|
# Allow large request bodies (screenshots are base64 encoded)
|
|
client_max_body_size 50M;
|
|
|
|
# Use Docker's internal DNS resolver (disable IPv6 to prevent SERVFAIL)
|
|
resolver 127.0.0.11 ipv6=off valid=30s;
|
|
set $backend http://master:9090;
|
|
|
|
# Serve static files from the React build
|
|
location / {
|
|
root /usr/share/nginx/html;
|
|
index index.html;
|
|
try_files $uri $uri/ /index.html;
|
|
}
|
|
|
|
# Reverse proxy API requests to the Master backend container
|
|
location /api/ {
|
|
proxy_pass $backend;
|
|
|
|
# Standard proxy headers
|
|
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;
|
|
|
|
# Increase timeouts for long-running execution result uploads
|
|
proxy_read_timeout 120s;
|
|
proxy_send_timeout 120s;
|
|
proxy_connect_timeout 30s;
|
|
}
|
|
}
|