From a6eaf5450b4563ac74db1151c67a4759a6ad68e0 Mon Sep 17 00:00:00 2001 From: Dominik Dzienia Date: Tue, 6 Jan 2026 03:21:21 +0100 Subject: [PATCH] Configurable verbosity of ops --- src/logic_docker.sh | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/src/logic_docker.sh b/src/logic_docker.sh index be66ee5..9079a05 100644 --- a/src/logic_docker.sh +++ b/src/logic_docker.sh @@ -12,12 +12,21 @@ get_docker_status() { } install_containers() { - docker compose --env-file $ENV_FILE_DEP -f $DOCKER_COMPOSE_FILE up --no-recreate -d >>"$LOGTO" 2>&1 + if [[ "$FORCE_DEBUG_LOG" == "1" && "$NONINTERACTIVE_MODE" = "true" ]]; then + docker compose --env-file $ENV_FILE_DEP -f $DOCKER_COMPOSE_FILE up --no-recreate -d + else + docker compose --env-file $ENV_FILE_DEP -f $DOCKER_COMPOSE_FILE up --no-recreate -d >>"$LOGTO" 2>&1 + fi } update_containers() { - docker compose --env-file $ENV_FILE_DEP -f $DOCKER_COMPOSE_FILE pull >>"$LOGTO" 2>&1 - docker compose --env-file $ENV_FILE_DEP -f $DOCKER_COMPOSE_FILE up -d >>"$LOGTO" 2>&1 + if [[ "$FORCE_DEBUG_LOG" == "1" && "$NONINTERACTIVE_MODE" = "true" ]]; then + docker compose --env-file $ENV_FILE_DEP -f $DOCKER_COMPOSE_FILE pull + docker compose --env-file $ENV_FILE_DEP -f $DOCKER_COMPOSE_FILE up -d + else + docker compose --env-file $ENV_FILE_DEP -f $DOCKER_COMPOSE_FILE pull >>"$LOGTO" 2>&1 + docker compose --env-file $ENV_FILE_DEP -f $DOCKER_COMPOSE_FILE up -d >>"$LOGTO" 2>&1 +fi } install_containers_progress() { @@ -28,7 +37,11 @@ install_containers_progress() { } uninstall_containers() { - docker compose --env-file $ENV_FILE_DEP -f $DOCKER_COMPOSE_FILE down >>"$LOGTO" 2>&1 + if [[ "$FORCE_DEBUG_LOG" == "1" && "$NONINTERACTIVE_MODE" = "true" ]]; then + docker compose --env-file $ENV_FILE_DEP -f $DOCKER_COMPOSE_FILE down + else + docker compose --env-file $ENV_FILE_DEP -f $DOCKER_COMPOSE_FILE down >>"$LOGTO" 2>&1 + fi } uninstall_containers_progress() {