From 8684f228c197036500fabf80e30ea45499f0dfd5 Mon Sep 17 00:00:00 2001 From: Gustavo Martin Morcuende Date: Wed, 25 Jan 2017 19:24:19 +0100 Subject: [PATCH] Giving a name with meaning to our container --- SpringJava/Gradle/spring-jpa-persistence/build.gradle | 3 ++- .../src/integTest/resources/docker/docker-compose.yml | 16 +++++++++------- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/SpringJava/Gradle/spring-jpa-persistence/build.gradle b/SpringJava/Gradle/spring-jpa-persistence/build.gradle index 747f69c..7b9212b 100644 --- a/SpringJava/Gradle/spring-jpa-persistence/build.gradle +++ b/SpringJava/Gradle/spring-jpa-persistence/build.gradle @@ -93,7 +93,8 @@ integTest.doFirst { // We need it for running tests from IDE and from command console but // also it will be required by systems like Travis where we do not control // the available ports. - def mysqlInfo = dockerCompose.servicesInfos.mysql + println dockerCompose.servicesInfos.'spring-jpa-persistence-mysql' + def mysqlInfo = dockerCompose.servicesInfos.'spring-jpa-persistence-mysql' systemProperty 'DATABASE_PORT', mysqlInfo.ports[3306] } diff --git a/SpringJava/Gradle/spring-jpa-persistence/src/integTest/resources/docker/docker-compose.yml b/SpringJava/Gradle/spring-jpa-persistence/src/integTest/resources/docker/docker-compose.yml index ef06111..ac15b9f 100644 --- a/SpringJava/Gradle/spring-jpa-persistence/src/integTest/resources/docker/docker-compose.yml +++ b/SpringJava/Gradle/spring-jpa-persistence/src/integTest/resources/docker/docker-compose.yml @@ -1,7 +1,9 @@ -mysql: - image: mysql - ports: - - "3306" - privileged: true - environment: - MYSQL_ROOT_PASSWORD: "root" +version: '2' +services: + spring-jpa-persistence-mysql: + image: mysql + ports: + - "3306" + privileged: true + environment: + MYSQL_ROOT_PASSWORD: "root" -- 2.1.4