Skip to content

Commit bb24708

Browse files
dave-tuckerbfirsh
authored andcommitted
Add Networks!
Signed-off-by: Dave Tucker <[email protected]>
1 parent 878cdeb commit bb24708

File tree

1 file changed

+34
-14
lines changed

1 file changed

+34
-14
lines changed

docker-compose.yml

Lines changed: 34 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,56 @@
11
version: "2"
2+
23
services:
34
voting-app:
45
build: ./voting-app/.
56
volumes:
6-
- ./voting-app:/app
7+
- ./voting-app:/app
78
ports:
89
- "5000:80"
910
links:
1011
- redis
12+
networks:
13+
- front-tier
14+
- back-tier
1115

12-
redis:
13-
image: redis
14-
ports: ["6379"]
16+
result-app:
17+
build: ./result-app/.
18+
volumes:
19+
- ./result-app:/app
20+
ports:
21+
- "5001:80"
22+
links:
23+
- db
24+
networks:
25+
- front-tier
26+
- back-tier
1527

1628
worker:
1729
build: ./worker
1830
links:
1931
- db
2032
- redis
33+
networks:
34+
- back-tier
35+
36+
redis:
37+
image: redis
38+
ports: ["6379"]
39+
networks:
40+
- back-tier
2141

2242
db:
2343
image: postgres:9.4
2444
volumes:
25-
- "myvolume:/var/lib/postgresql/data"
45+
- "db-data:/var/lib/postgresql/data"
46+
networks:
47+
- back-tier
2648

27-
result-app:
28-
build: ./result-app/.
29-
volumes:
30-
- ./result-app:/app
31-
ports:
32-
- "5001:80"
33-
links:
34-
- db
3549
volumes:
36-
myvolume:
50+
db-data:
51+
52+
networks:
53+
front-tier:
54+
back-tier:
55+
56+

0 commit comments

Comments
 (0)