42 lines
1.1 KiB
Plaintext
42 lines
1.1 KiB
Plaintext
map $http_upgrade $connection_upgrade {
|
|||
|
|
default upgrade;
|
||
|
|
'' close;
|
||
|
|
}
|
||
|
|
|
||
|
|
upstream nextjs_upstream {
|
||
|
|
server web:3000;
|
||
|
|
}
|
||
|
|
|
||
|
|
upstream socketio_upstream {
|
||
|
|
server ingestion:4000;
|
||
|
|
}
|
||
|
|
|
||
|
|
server {
|
||
|
|
listen 80;
|
||
|
|
server_name _;
|
||
|
|
|
||
|
|
client_max_body_size 50M;
|
||
|
|
|
||
|
|
location /socket.io/ {
|
||
|
|
proxy_pass http://socketio_upstream;
|
||
|
|
proxy_http_version 1.1;
|
||
|
|
proxy_set_header Upgrade $http_upgrade;
|
||
|
|
proxy_set_header Connection $connection_upgrade;
|
||
|
|
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 $http_x_forwarded_proto;
|
||
|
|
proxy_read_timeout 86400s;
|
||
|
|
proxy_send_timeout 86400s;
|
||
|
|
proxy_buffering off;
|
||
|
|
}
|
||
|
|
|
||
|
|
location / {
|
||
|
|
proxy_pass http://nextjs_upstream;
|
||
|
|
proxy_http_version 1.1;
|
||
|
|
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 $http_x_forwarded_proto;
|
||
|
|
}
|
||
|
|
}
|