Skip to content

Commit 527df84

Browse files
author
Mano Marks
authored
Updating to reflect changes in the Example Voting App
Updated `docker-compose.yml` file to reflect current status in the Example Voting App.
1 parent 59313a0 commit 527df84

File tree

1 file changed

+34
-24
lines changed

1 file changed

+34
-24
lines changed

beginner/chapters/votingapp.md

+34-24
Original file line numberDiff line numberDiff line change
@@ -50,51 +50,61 @@ Now, run your application. To do that, we'll use [Docker Compose](https://docs.d
5050
version: "2"
5151

5252
services:
53-
voting-app:
54-
build: ./voting-app/.
53+
vote:
54+
build: ./vote
55+
command: python app.py
5556
volumes:
56-
- ./voting-app:/app
57+
- ./vote:/app
5758
ports:
5859
- "5000:80"
5960
networks:
6061
- front-tier
6162
- back-tier
6263

63-
version: "2"
64-
65-
services:
66-
vote:
67-
build: ./vote
68-
command: python app.py
64+
result:
65+
build: ./result
66+
command: nodemon --debug server.js
6967
volumes:
70-
- ./vote:/app
68+
- ./result:/app
7169
ports:
72-
- "5000:80"
70+
- "5001:80"
71+
- "5858:5858"
72+
networks:
73+
- front-tier
74+
- back-tier
75+
76+
worker:
77+
build: ./worker
78+
networks:
79+
- back-tier
7380

7481
redis:
7582
image: redis:alpine
83+
container_name: redis
7684
ports: ["6379"]
77-
78-
worker:
79-
build: ./worker
85+
networks:
86+
- back-tier
8087

8188
db:
8289
image: postgres:9.4
83-
84-
result:
85-
build: ./result
86-
command: nodemon --debug server.js
90+
container_name: db
8791
volumes:
88-
- ./result:/app
89-
ports:
90-
- "5001:80"
91-
- "5858:5858"
92+
- "db-data:/var/lib/postgresql/data"
93+
networks:
94+
- back-tier
95+
96+
volumes:
97+
db-data:
98+
99+
networks:
100+
front-tier:
101+
back-tier:
92102
```
93103
94104
This Compose file defines
95105
96-
- A voting-app container based on a Python image
97-
- A result-app container based on a Node.js image
106+
- A vote container based on a Python image
107+
- A result container based on a Node.js image
98108
- A redis container based on a redis image, to temporarily store the data.
99109
- A .NET based worker app based on a .NET image
100110
- A Postgres container based on a postgres image

0 commit comments

Comments
 (0)