From bb247081284821c9823af17ffe5d06c25bd5297e Mon Sep 17 00:00:00 2001 From: Dave Tucker Date: Thu, 28 Jan 2016 15:57:37 -0800 Subject: [PATCH] Add Networks! Signed-off-by: Dave Tucker --- docker-compose.yml | 54 +++++++++++++++++++++++++++++++--------------- 1 file changed, 37 insertions(+), 17 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 713df2d..b9a418c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,28 +1,17 @@ version: "2" + services: voting-app: build: ./voting-app/. volumes: - - ./voting-app:/app + - ./voting-app:/app ports: - "5000:80" links: - redis - - redis: - image: redis - ports: ["6379"] - - worker: - build: ./worker - links: - - db - - redis - - db: - image: postgres:9.4 - volumes: - - "myvolume:/var/lib/postgresql/data" + networks: + - front-tier + - back-tier result-app: build: ./result-app/. @@ -32,5 +21,36 @@ services: - "5001:80" links: - db + networks: + - front-tier + - back-tier + + worker: + build: ./worker + links: + - db + - redis + networks: + - back-tier + + redis: + image: redis + ports: ["6379"] + networks: + - back-tier + + db: + image: postgres:9.4 + volumes: + - "db-data:/var/lib/postgresql/data" + networks: + - back-tier + volumes: - myvolume: + db-data: + +networks: + front-tier: + back-tier: + +