diff --git a/scripts/rcstack/rcstack b/scripts/rcstack/rcstack index 3a60d62..e9ba879 100755 --- a/scripts/rcstack/rcstack +++ b/scripts/rcstack/rcstack @@ -3490,12 +3490,18 @@ rcstack_stack_upgrade_rhodecode_command() { scale_2=$(( scale * 2 )) echo "" - echo "Found $scale services for $target_container" - echo "existing docker-ids:" "${old_docker_ids[@]}" + echo "Found $scale old container[s] for $target_container" + echo "Old container-ids:" "${old_docker_ids[@]}" echo "" - echo "Scaling to 2x ($scale_2 total) containers for $target_container" - ./$RC_SCRIPT_NAME stack rhodecode up $target_container --no-recreate --detach --scale $target_container=$scale_2 + if [[ $scale == "0" ]]; then + echo "No previous services found, doing a regular start for $target_container" + ./$RC_SCRIPT_NAME stack rhodecode up $target_container --detach + return + else + echo "Scaling to 2x ($scale_2 total) containers for $target_container" + ./$RC_SCRIPT_NAME stack rhodecode up $target_container --no-recreate --detach --scale $target_container=$scale_2 + fi # array with ALL new containers local -a scaled_docker_ids