macrdel commited on
Commit
2c8418e
1 Parent(s): e050f86

update workflow

Browse files
Files changed (2) hide show
  1. docker-compose.yml +5 -17
  2. nginx/nginx.conf +3 -3
docker-compose.yml CHANGED
@@ -6,20 +6,20 @@ services:
6
  container_name: sentiment-summarize-youtube-comments-1
7
  ports:
8
  - "8001:8000"
 
 
9
  depends_on:
10
  - prometheus
11
- networks:
12
- - custom
13
 
14
- app1:
15
  build: .
16
  container_name: sentiment-summarize-youtube-comments-2
17
  ports:
18
  - "8002:8000"
 
 
19
  depends_on:
20
  - prometheus
21
- networks:
22
- - custom
23
 
24
  nginx:
25
  image: nginx:latest
@@ -28,10 +28,6 @@ services:
28
  - "8000:80"
29
  volumes:
30
  - ./nginx/nginx.conf:/etc/nginx/conf.d/default.conf
31
- depends_on:
32
- - app
33
- networks:
34
- - custom
35
 
36
  prometheus:
37
  image: prom/prometheus
@@ -40,8 +36,6 @@ services:
40
  - ./prometheus/prometheus.yml:/etc/prometheus/prometheus.yml
41
  ports:
42
  - "9090:9090"
43
- networks:
44
- - custom
45
 
46
  grafana:
47
  image: grafana/grafana
@@ -52,8 +46,6 @@ services:
52
  - GF_SECURITY_ADMIN_PASSWORD=admin
53
  depends_on:
54
  - prometheus
55
- networks:
56
- - custom
57
 
58
  tests:
59
  build:
@@ -64,7 +56,3 @@ services:
64
  depends_on:
65
  - app
66
  command: pytest tests
67
-
68
- networks:
69
- custom:
70
- driver: bridge
 
6
  container_name: sentiment-summarize-youtube-comments-1
7
  ports:
8
  - "8001:8000"
9
+ volumes:
10
+ - .:/home/user/app
11
  depends_on:
12
  - prometheus
 
 
13
 
14
+ app2:
15
  build: .
16
  container_name: sentiment-summarize-youtube-comments-2
17
  ports:
18
  - "8002:8000"
19
+ volumes:
20
+ - .:/home/user/app
21
  depends_on:
22
  - prometheus
 
 
23
 
24
  nginx:
25
  image: nginx:latest
 
28
  - "8000:80"
29
  volumes:
30
  - ./nginx/nginx.conf:/etc/nginx/conf.d/default.conf
 
 
 
 
31
 
32
  prometheus:
33
  image: prom/prometheus
 
36
  - ./prometheus/prometheus.yml:/etc/prometheus/prometheus.yml
37
  ports:
38
  - "9090:9090"
 
 
39
 
40
  grafana:
41
  image: grafana/grafana
 
46
  - GF_SECURITY_ADMIN_PASSWORD=admin
47
  depends_on:
48
  - prometheus
 
 
49
 
50
  tests:
51
  build:
 
56
  depends_on:
57
  - app
58
  command: pytest tests
 
 
 
 
nginx/nginx.conf CHANGED
@@ -1,6 +1,6 @@
1
- upstream backend {
2
  server app:8000;
3
- server app1:8000;
4
  }
5
 
6
  server {
@@ -8,6 +8,6 @@ server {
8
  server_name _;
9
 
10
  location / {
11
- proxy_pass http://backend;
12
  }
13
  }
 
1
+ upstream app {
2
  server app:8000;
3
+ server app2:8000;
4
  }
5
 
6
  server {
 
8
  server_name _;
9
 
10
  location / {
11
+ proxy_pass http://app;
12
  }
13
  }