From 5e7bbf77b55eedd6a861d83b0a9a62901e3f4226 Mon Sep 17 00:00:00 2001 From: Brad van der Laan Date: Sat, 2 Jun 2018 23:44:07 -0400 Subject: [PATCH] Update to docker-compose v3 This change set updates the docker-compose file in the develop folder to use the v3 syntax. This allows us to add a user layer network so that the two containers can communicate without having to go up the network stack. This allows us to not have to expose the registery's port (5000) to the host. This reduces the chance of a port conflict --- develop/docker-compose.yml | 44 ++++++++++++++++++++++++-------------- 1 file changed, 28 insertions(+), 16 deletions(-) diff --git a/develop/docker-compose.yml b/develop/docker-compose.yml index 3ac4b0a..c825636 100644 --- a/develop/docker-compose.yml +++ b/develop/docker-compose.yml @@ -1,16 +1,28 @@ -frontend: - build: . - links: - - registry:path-to-your-registry-v2 - ports: - # Serves the page via grunt - - "9000:9000" - # For live reload with grunt - - "35729:35729" - volumes: - - ../:/source:rw - - ./start-develop.sh:/root/start-develop.sh:ro -registry: - image: registry:2.1.1 - ports: - - "5000:5000" +version: '3.2' +services: + frontend: + build: . + ports: + # Serves the page via grunt + - "9000:9000" + # For live reload with grunt + - "35729:35729" + depends_on: + - registry + volumes: + - ../:/source:rw + - ./start-develop.sh:/root/start-develop.sh:ro + environment: + - DOCKER_REGISTRY_HOST=registry + - DOCKER_REGISTRY_PORT=5000 + registry: + image: registry:2.1.1 + expose: + - "5000" + networks: + dev_net: + aliases: + - path-to-your-registry-v2 + +networks: + dev_net: