moved docker-compose.yml to docker-compose-simple.yml and restored older version of docker-compose.yml with networks and volumes

This commit is contained in:
Mano Marks 2016-10-11 16:24:49 -07:00
parent 4065c3e61d
commit 51815474ff
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 - ./vote:/app
ports: ports:
- "5000:80" - "5000:80"
networks:
redis: - front-tier
image: redis:alpine - back-tier
ports: ["6379"]
worker:
build: ./worker
db:
image: postgres:9.4
result: result:
build: ./result build: ./result
@ -27,3 +20,33 @@ services:
ports: ports:
- "5001:80" - "5001:80"
- "5858:5858" - "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: