-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnginx.config
107 lines (88 loc) · 2.5 KB
/
nginx.config
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
server {
listen 80;
listen [::]:80;
server_name default;
access_log off;
error_log off;
proxy_redirect off;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header X-Forwarded-Proto $scheme;
proxy_buffering off;
client_max_body_size 100M;
location @dev-ui-proxy {
proxy_pass http://web-ui:4321;
}
location @dev-ui2-proxy {
proxy_pass http://web-ui-mk2:5173;
}
location / {
root /app/dist/;
index index.html;
try_files $uri $uri/ @dev-ui-proxy;
}
location /mk2/ {
alias /app2/build/;
index index.html;
try_files $uri $uri/ @dev-ui2-proxy;
}
location /api/ {
proxy_pass http://api:5000/;
}
location @frame-proxy {
proxy_pass http://api:5000/frame/$1/$2/;
}
location ~ "^/api/frame/([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})/(\d+)/" {
root /static;
try_files /$1/frames/$2.jpeg @frame-proxy;
}
location /jupyter {
proxy_pass http://api:8888;
}
location ~ /jupyter/api/kernels/ {
proxy_pass http://api:8888;
proxy_http_version 1.1;
proxy_set_header Host $http_host;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_read_timeout 86400;
}
location ~ /jupyter/terminals/ {
proxy_pass http://api:8888;
proxy_http_version 1.1;
proxy_set_header Host $http_host;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_read_timeout 86400;
}
location ~* /jupyter/(\d+)/(.*) {
resolver 127.0.0.11 ipv6=off;
proxy_pass http://api:$1/$2$is_args$args;
}
location ~ /poseplot {
proxy_pass http://web-extras:7000;
proxy_http_version 1.1;
proxy_set_header Host $http_host;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_read_timeout 86400;
}
error_page 500 502 503 504 /server_error.html;
location = /server_error.html {
add_header Content-Type text/html;
return 200 '
<html>
<head><meta charset="utf-8"><meta http-equiv="refresh" content="2"></head>
<body><h3>Application reloading...</h3><a href="/">Click here if this page doesn’t automatically refresh...</a></body>
</html>
';
}
}