From 2c597c2ff4205569cabbdae31147845a0640d20f Mon Sep 17 00:00:00 2001 From: Solomon Laing Date: Sun, 13 Jun 2021 08:24:15 +0000 Subject: [PATCH] Update .gitlab-ci.yml --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d035e4c..d12dffc 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -47,7 +47,7 @@ deploy: - docker environment: name: Production - url: "$Live_Server_IP" + url: "$LIVE_SERVER_FQDN" when: manual before_script: - 'command -v ssh-agent >/dev/null || ( apt-get update -y && apt-get install openssh-client -y)' @@ -57,4 +57,4 @@ deploy: - chmod 700 ~/.ssh - '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" >> ~/.ssh/config' script: - - ssh -J "$Live_Server_User"@"$Live_Server_IP" "$Live_Server_User"@"$Live_Server_Target" "echo -e 'dev:\n image: \'$CI_REGISTRY_IMAGE:$CI_COMMIT_SHA\'\n restart: always\n ports:\n - \'8090:5000\'\n only:\n - master' > docker-compose.yml && docker-compose up -d --remove-orphans --force-recreate" \ No newline at end of file + - ssh -J "$PROD_SERVER_USER"@"$LIVE_SERVER_FQDN" "$PROD_SERVER_USER"@"$PROD_SERVER_LOCAL_HOST_NAME" "sed 's/"$CI_REGISTRY_IMAGE".*/"$CI_REGISTRY_IMAGE":"$CI_COMMIT_SHA"' && docker-compose up -d --remove-orphans --force-recreate"