chawin.chen commited on
Commit
a6fd509
·
1 Parent(s): e56f330
Files changed (2) hide show
  1. Dockerfile +0 -1
  2. nginx/conf.d/nginx-ui.conf +38 -0
Dockerfile CHANGED
@@ -2,7 +2,6 @@ FROM uozi/nginx-ui:latest
2
 
3
  RUN mkdir -p /etc/nginx /etc/nginx-ui /var/www
4
 
5
- COPY app.ini /etc/nginx-ui/app.ini
6
  COPY www/ /var/www/
7
  COPY nginx/ /etc/nginx/
8
 
 
2
 
3
  RUN mkdir -p /etc/nginx /etc/nginx-ui /var/www
4
 
 
5
  COPY www/ /var/www/
6
  COPY nginx/ /etc/nginx/
7
 
nginx/conf.d/nginx-ui.conf CHANGED
@@ -2,6 +2,18 @@ map $http_upgrade $connection_upgrade {
2
  default upgrade;
3
  '' close;
4
  }
 
 
 
 
 
 
 
 
 
 
 
 
5
  server {
6
  listen 7860;
7
  server_name localhost;# your domain here
@@ -33,4 +45,30 @@ server {
33
  root /var/www;
34
  index index.html index.htm;
35
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
36
  }
 
2
  default upgrade;
3
  '' close;
4
  }
5
+ upstream facescore_pool {
6
+ least_conn;
7
+ server ethonmax-picpocket.hf.space weight=2 max_fails=1 fail_timeout=60s;
8
+ keepalive 64;
9
+ }
10
+
11
+ upstream facescore_analyze {
12
+ least_conn;
13
+ server ethonmax-picpocket.hf.space weight=2 max_fails=1 fail_timeout=60s;
14
+ keepalive 64;
15
+ }
16
+
17
  server {
18
  listen 7860;
19
  server_name localhost;# your domain here
 
45
  root /var/www;
46
  index index.html index.htm;
47
  }
48
+
49
+ location /facescore/analyze {
50
+ proxy_pass http://facescore_analyze;
51
+ proxy_set_header Host $host;
52
+ proxy_set_header X-Real-IP $remote_addr;
53
+ }
54
+ location /facescore/check_image_security {
55
+ proxy_pass http://facescore_analyze;
56
+ proxy_set_header Host $host;
57
+ proxy_set_header X-Real-IP $remote_addr;
58
+ }
59
+ location /facescore {
60
+ proxy_pass http://facescore_pool;
61
+ proxy_set_header Host $host;
62
+ proxy_set_header X-Real-IP $remote_addr;
63
+ }
64
+
65
+ location /cp_docs {
66
+ proxy_pass http://facescore_pool;
67
+ sub_filter '/openapi.json' '/cp_docs/openapi.json';
68
+ sub_filter '/docs' '/cp_docs/docs';
69
+ sub_filter_once off;
70
+ }
71
+ location /cp_docs/openapi.json {
72
+ proxy_pass http://facescore_pool/openapi.json;
73
+ }
74
  }