Skip to content

Commit

Permalink
Updating to reflect changes in the Example Voting App
Browse files Browse the repository at this point in the history
Updated `docker-compose.yml` file to reflect current status in the Example Voting App.
  • Loading branch information
Mano Marks authored Oct 19, 2016
1 parent 59313a0 commit 527df84
Showing 1 changed file with 34 additions and 24 deletions.
58 changes: 34 additions & 24 deletions beginner/chapters/votingapp.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,51 +50,61 @@ Now, run your application. To do that, we'll use [Docker Compose](https://docs.d
version: "2"

services:
voting-app:
build: ./voting-app/.
vote:
build: ./vote
command: python app.py
volumes:
- ./voting-app:/app
- ./vote:/app
ports:
- "5000:80"
networks:
- front-tier
- back-tier

version: "2"

services:
vote:
build: ./vote
command: python app.py
result:
build: ./result
command: nodemon --debug server.js
volumes:
- ./vote:/app
- ./result:/app
ports:
- "5000:80"
- "5001:80"
- "5858:5858"
networks:
- front-tier
- back-tier

worker:
build: ./worker
networks:
- back-tier

redis:
image: redis:alpine
container_name: redis
ports: ["6379"]

worker:
build: ./worker
networks:
- back-tier

db:
image: postgres:9.4

result:
build: ./result
command: nodemon --debug server.js
container_name: db
volumes:
- ./result:/app
ports:
- "5001:80"
- "5858:5858"
- "db-data:/var/lib/postgresql/data"
networks:
- back-tier

volumes:
db-data:

networks:
front-tier:
back-tier:
```
This Compose file defines
- A voting-app container based on a Python image
- A result-app container based on a Node.js image
- A vote container based on a Python image
- A result container based on a Node.js image
- A redis container based on a redis image, to temporarily store the data.
- A .NET based worker app based on a .NET image
- A Postgres container based on a postgres image
Expand Down

0 comments on commit 527df84

Please sign in to comment.