From 65455d693aaa4908a0db4116123e110289f12e1e Mon Sep 17 00:00:00 2001 From: Vicente Falco Date: Tue, 5 Sep 2017 13:40:29 +0200 Subject: [PATCH 1/2] docker --- docker-compose.yml | 40 ++++++++++++++++++---------------------- 1 file changed, 18 insertions(+), 22 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index f9e39c259..f8d0408e8 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,12 +1,8 @@ -version: '2' -environment: - - branchName=${env.BRANCH_NAME} - - NODE_ENV= - - dockerHost= +version: '3' services: auth: - container_name: ${branchName}-auth - docker_host: ${dockerHost} + container_name: "${BRANCH_NAME}-auth" + image: "auth:${TAG}" build: context: ./services/auth expose: @@ -15,8 +11,8 @@ services: - "3000:3000" salix: - container_name: ${branchName}-salix - docker_host: ${dockerHost} + container_name: "${BRANCH_NAME}-salix" + image: "salix:${TAG}" build: context: ./services/salix expose: @@ -25,8 +21,8 @@ services: - "3001:3001" client: - container_name: ${branchName}-client - docker_host: ${dockerHost} + container_name: "${BRANCH_NAME}-client" + image: "client:${TAG}" build: context: ./services/client expose: @@ -35,8 +31,8 @@ services: - "3002:3002" mailer: - container_name: ${branchName}-mailer - docker_host: ${dockerHost} + container_name: "${BRANCH_NAME}-mailer" + image: "mailer:${TAG}" build: context: ./services/mailer expose: @@ -45,8 +41,8 @@ services: - "3003:3003" production: - container_name: ${branchName}-production - docker_host: ${dockerHost} + container_name: "${BRANCH_NAME}-production" + image: "production:${TAG}" build: context: ./services/production expose: @@ -55,15 +51,15 @@ services: - "3004:3004" nginx: - container_name: ${branchName}-nginx - docker_host: ${dockerHost} + container_name: "${BRANCH_NAME}-nginx" + image: "nginx:${TAG}" build: context: ./services/nginx ports: - "80:8080" links: - - "auth:${branchName}-auth" - - "salix:${branchName}-salix" - - "client:${branchName}-client" - - "mailer:${branchName}-mailer" - - "production:${branchName}-production" \ No newline at end of file + - "auth:"${BRANCH_NAME}-auth" + - "salix:"${BRANCH_NAME}-salix" + - "client:"${BRANCH_NAME}-client" + - "mailer:"${BRANCH_NAME}-mailer" + - "production:"${BRANCH_NAME}-production" \ No newline at end of file From 7323d77f5942d90d3f6be366776b3f2ca474a3ce Mon Sep 17 00:00:00 2001 From: Vicente Falco Date: Tue, 5 Sep 2017 13:42:51 +0200 Subject: [PATCH 2/2] Jenkins --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index b194b2634..ce91d8649 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -50,7 +50,7 @@ node { echo "${returnDocker}"; returnDocker = sh (script: "docker rm ${prefixDocker}-${element}", returnStdout: false).trim(); //echo "${returnDocker}"; - //returnDocker = sh (script: "docker rmi ${prefixDocker}-${element}:${buildNumber-3}", returnStdout: true).trim(); + returnDocker = sh (script: "docker rmi ${prefixDocker}-${element}:${buildNumber-3}", returnStdout: true).trim(); echo "borran ${prefixDocker}-${element}:${buildNumber-3}"; //echo "${returnDocker}"; }catch(Exception _){