-
Notifications
You must be signed in to change notification settings - Fork 0
/
nginx.conf
39 lines (31 loc) · 941 Bytes
/
nginx.conf
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
36
37
38
39
http {
#upgrade websocket connection
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
#all node containers
upstream node-containers {
server node-app:5000;
}
#server instance
server {
listen 80; #ipv4
listen [::]:80; #ipv6
server_name _; #here the domain
location / {
proxy_pass http://node-containers/; #reverse proxy
}
location /graphql {
proxy_pass http://node-containers/graphql; #reverse proxy
#upgrade connection
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_set_header Host $host;
#timeouts
proxy_read_timeout 60s; #If the proxied server does not transmit anything within this time, the connection is closed.
}
}
}
events { }