macrdel commited on
Commit
1e26229
1 Parent(s): 35b4979

update workflow

Browse files
Files changed (2) hide show
  1. docker-compose.yml +4 -1
  2. nginx/nginx.conf +19 -5
docker-compose.yml CHANGED
@@ -27,7 +27,10 @@ services:
27
  ports:
28
  - "8000:80"
29
  volumes:
30
- - ./nginx/nginx.conf:/etc/nginx/conf.d/default.conf
 
 
 
31
 
32
  prometheus:
33
  image: prom/prometheus
 
27
  ports:
28
  - "8000:80"
29
  volumes:
30
+ - ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro
31
+ depends_on:
32
+ - app
33
+ - app2
34
 
35
  prometheus:
36
  image: prom/prometheus
nginx/nginx.conf CHANGED
@@ -1,13 +1,27 @@
1
- upstream app {
2
- server app:8000;
3
- server app2:8000;
 
 
 
4
  }
5
 
6
  server {
7
  listen 80;
8
- server_name _;
9
 
10
  location / {
11
- proxy_pass http://app;
 
 
 
 
 
 
 
 
 
 
 
 
12
  }
13
  }
 
1
+ upstream app1 {
2
+ server sentiment-summarize-youtube-comments-1:8000;
3
+ }
4
+
5
+ upstream app2 {
6
+ server sentiment-summarize-youtube-comments-2:8000;
7
  }
8
 
9
  server {
10
  listen 80;
 
11
 
12
  location / {
13
+ proxy_pass http://app1;
14
+ proxy_set_header Host $host;
15
+ proxy_set_header X-Real-IP $remote_addr;
16
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
17
+ proxy_set_header X-Forwarded-Proto $scheme;
18
+ }
19
+
20
+ location /app2 {
21
+ proxy_pass http://app2;
22
+ proxy_set_header Host $host;
23
+ proxy_set_header X-Real-IP $remote_addr;
24
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
25
+ proxy_set_header X-Forwarded-Proto $scheme;
26
  }
27
  }