From 852a1a6f0658b204c24cd0cf71e946177ce6b37c Mon Sep 17 00:00:00 2001 From: Liran Tal Date: Mon, 18 Apr 2016 00:40:05 +0300 Subject: [PATCH] feat(docker): persisting the container names for the docker containers that get created allows to easily use an alias instead of the container id which is automatically generated and is usually different --- docker-compose.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 27135bbc3a..90eb818f2c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,6 +1,7 @@ web: restart: always build: . + container_name: meanjs command: npm start links: - db @@ -16,8 +17,9 @@ web: - /opt/mean.js/public - /opt/mean.js/uploads db: - restart: always image: mongo:3.2 + container_name: db_1 + restart: always ports: - "27017:27017" volumes: