File tree Expand file tree Collapse file tree 2 files changed +62
-10
lines changed Expand file tree Collapse file tree 2 files changed +62
-10
lines changed Original file line number Diff line number Diff line change
1
+ version : " 2"
2
+
3
+ services :
4
+ vote :
5
+ build : ./vote
6
+ command : python app.py
7
+ volumes :
8
+ - ./vote:/app
9
+ ports :
10
+ - " 5000:80"
11
+
12
+ redis :
13
+ image : redis:alpine
14
+ ports : ["6379"]
15
+
16
+ worker :
17
+ build : ./worker
18
+
19
+ db :
20
+ image : postgres:9.4
21
+
22
+ result :
23
+ build : ./result
24
+ command : nodemon --debug server.js
25
+ volumes :
26
+ - ./result:/app
27
+ ports :
28
+ - " 5001:80"
29
+ - " 5858:5858"
Original file line number Diff line number Diff line change @@ -8,16 +8,9 @@ services:
8
8
- ./vote:/app
9
9
ports :
10
10
- " 5000:80"
11
-
12
- redis :
13
- image : redis:alpine
14
- ports : ["6379"]
15
-
16
- worker :
17
- build : ./worker
18
-
19
- db :
20
- image : postgres:9.4
11
+ networks :
12
+ - front-tier
13
+ - back-tier
21
14
22
15
result :
23
16
build : ./result
@@ -27,3 +20,33 @@ services:
27
20
ports :
28
21
- " 5001:80"
29
22
- " 5858:5858"
23
+ networks :
24
+ - front-tier
25
+ - back-tier
26
+
27
+ worker :
28
+ build : ./worker
29
+ networks :
30
+ - back-tier
31
+
32
+ redis :
33
+ image : redis:alpine
34
+ container_name : redis
35
+ ports : ["6379"]
36
+ networks :
37
+ - back-tier
38
+
39
+ db :
40
+ image : postgres:9.4
41
+ container_name : db
42
+ volumes :
43
+ - " db-data:/var/lib/postgresql/data"
44
+ networks :
45
+ - back-tier
46
+
47
+ volumes :
48
+ db-data :
49
+
50
+ networks :
51
+ front-tier :
52
+ back-tier:
You can’t perform that action at this time.
0 commit comments