From 764ea6bbdcd51bb13460a8bce4bca24a83731dc1 Mon Sep 17 00:00:00 2001 From: Colton Loftus <70598503+C-Loftus@users.noreply.github.com> Date: Thu, 23 Jan 2025 12:59:08 -0500 Subject: [PATCH] speed up by detaching in ci/cd --- main.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/main.py b/main.py index bbbe0982..9dd2d6fb 100644 --- a/main.py +++ b/main.py @@ -99,9 +99,11 @@ def up(local: bool, debug: bool): else: compose_args = "-c ./Docker/docker-compose-user-code.yaml -c ./Docker/docker-compose-separated-dagster.yaml" - run_subprocess( - f"docker stack deploy {compose_args} geoconnex_crawler --detach=false" - ) + # if we are in ci/cd we want to run the stack in the background so we don't wait for convergence and validating all the containers after they are spun up + detach_for_speedup = not sys.stdin.isatty() + docker_stack_cmd = f"docker stack deploy {compose_args} geoconnex_crawler --detach={detach_for_speedup}" + print(f"Deploying infrastructure with command: '{docker_stack_cmd}'") + run_subprocess(docker_stack_cmd) def refresh():