From 9e7dac91b4dd5dd2366718283d6da0b2b0c08ef0 Mon Sep 17 00:00:00 2001 From: Sergey Stepanov Date: Wed, 25 Aug 2021 16:11:19 +0300 Subject: [PATCH] Update CD script --- .github/workflows/cd/deploy-app.sh | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/cd/deploy-app.sh b/.github/workflows/cd/deploy-app.sh index c3ffa47d..215425fa 100755 --- a/.github/workflows/cd/deploy-app.sh +++ b/.github/workflows/cd/deploy-app.sh @@ -129,13 +129,6 @@ echo "IPs:" $IP_LIST # if the current server address is found in the IP_LIST variable, otherwise it # will run just the worker app. # -# build run command -cmd="ZONE=\$zone docker-compose up -d --remove-orphans --scale worker=\${workers:-$WORKERS}" -if [ ! -z "$SPLIT_HOSTS" ]; then - cmd+=" worker" - deploy_coordinator=0 - deploy_worker=1 -fi for ip in $IP_LIST; do # flags @@ -148,6 +141,14 @@ for ip in $IP_LIST; do ssh-keyscan $ip >> ~/.ssh/known_hosts fi + # build run command + cmd="ZONE=\$zone docker-compose up -d --remove-orphans --scale worker=\${workers:-$WORKERS}" + if [ ! -z "$SPLIT_HOSTS" ]; then + cmd+=" worker" + deploy_coordinator=0 + deploy_worker=1 + fi + # override run command if [ ! -z "$SPLIT_HOSTS" ]; then for addr in $COORDINATORS; do