34 lines
948 B
Nginx Configuration File
34 lines
948 B
Nginx Configuration File
# nginx LB for docker-compose-cluster.yml.
|
|
# Sends all traffic to the Java app (including /api/v1/ai/*, which the app proxies to
|
|
# the engine with X-Engine-Auth attestation). /internal/* is 404'd. The engine tier
|
|
# is never exposed directly to clients.
|
|
|
|
events { worker_connections 1024; }
|
|
|
|
http {
|
|
upstream stirling_app {
|
|
# Sticky sessions required - see deploy/aws/README.md for ip_hash caveat + alternatives.
|
|
ip_hash;
|
|
server app-1:8080;
|
|
server app-2:8080;
|
|
}
|
|
|
|
server {
|
|
listen 8080;
|
|
|
|
# Matches JVM multipart.max-file-size; nginx default 1MB would 413.
|
|
client_max_body_size 2000m;
|
|
|
|
location /internal/ {
|
|
return 404;
|
|
}
|
|
|
|
location / {
|
|
proxy_pass http://stirling_app;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header Host $host;
|
|
proxy_read_timeout 600s;
|
|
}
|
|
}
|
|
}
|