abcd118q commited on
Commit
62e6e60
·
verified ·
1 Parent(s): 5753a1b

Update nginx.conf

Browse files
Files changed (1) hide show
  1. nginx.conf +14 -1
nginx.conf CHANGED
@@ -2,10 +2,23 @@ server {
2
  listen 7860;
3
  client_max_body_size 100M;
4
 
 
 
 
 
 
 
5
  location / {
6
- proxy_pass http://127.0.0.1:8087; # Huly Front
7
  proxy_set_header Host $host;
8
  proxy_set_header X-Real-IP $remote_addr;
 
 
 
 
 
 
 
9
  }
10
 
11
  location /_accounts {
 
2
  listen 7860;
3
  client_max_body_size 100M;
4
 
5
+ # Fallback while services start up
6
+ location /health {
7
+ return 200 'starting';
8
+ add_header Content-Type text/plain;
9
+ }
10
+
11
  location / {
12
+ proxy_pass http://127.0.0.1:8087;
13
  proxy_set_header Host $host;
14
  proxy_set_header X-Real-IP $remote_addr;
15
+ proxy_connect_timeout 5s;
16
+ error_page 502 503 504 = @loading;
17
+ }
18
+
19
+ location @loading {
20
+ return 200 '<html><body><h2>Huly is starting up, please wait...</h2></body></html>';
21
+ add_header Content-Type text/html;
22
  }
23
 
24
  location /_accounts {