Merge pull request #40 from ManoMarks/master

Adding additional compose file
This commit is contained in:
Ben Firshman 2016-10-19 07:57:29 +01:00 committed by GitHub
commit ed73c0c428
2 changed files with 62 additions and 10 deletions

29
docker-compose-simple.yml Normal file
View File

@ -0,0 +1,29 @@
version: "2"
services:
vote:
build: ./vote
command: python app.py
volumes:
- ./vote:/app
ports:
- "5000:80"
redis:
image: redis:alpine
ports: ["6379"]
worker:
build: ./worker
db:
image: postgres:9.4
result:
build: ./result
command: nodemon --debug server.js
volumes:
- ./result:/app
ports:
- "5001:80"
- "5858:5858"

View File

@ -8,16 +8,9 @@ services:
- ./vote:/app
ports:
- "5000:80"
redis:
image: redis:alpine
ports: ["6379"]
worker:
build: ./worker
db:
image: postgres:9.4
networks:
- front-tier
- back-tier
result:
build: ./result
@ -27,3 +20,33 @@ services:
ports:
- "5001:80"
- "5858:5858"
networks:
- front-tier
- back-tier
worker:
build: ./worker
networks:
- back-tier
redis:
image: redis:alpine
container_name: redis
ports: ["6379"]
networks:
- back-tier
db:
image: postgres:9.4
container_name: db
volumes:
- "db-data:/var/lib/postgresql/data"
networks:
- back-tier
volumes:
db-data:
networks:
front-tier:
back-tier: