Clean up Docker Compose deployment output

- Add --quiet flag to run_cmd for silent Docker deployments
- Suppress verbose Docker Compose output (progress bars, warnings)
- Show clean 'Deploying X Stack' and 'Success' messages instead
- Updated all deployment functions: core, infrastructure, dashboards, arcane, dockge, sablier, traefik
This commit is contained in:
2026-02-10 21:11:19 -05:00
parent f9aa9d4f59
commit 299d008f82

View File

@@ -1119,7 +1119,7 @@ deploy_dockge() {
# Deploy Dockge stack # Deploy Dockge stack
cd /opt/dockge cd /opt/dockge
run_cmd docker compose up -d || true run_cmd --quiet docker compose up -d
log_success "Dockge deployed" log_success "Dockge deployed"
echo "" echo ""
} }
@@ -1252,7 +1252,7 @@ PYFIX
# Deploy core stack # Deploy core stack
debug_log "Deploying core stack with docker compose" debug_log "Deploying core stack with docker compose"
cd /opt/stacks/core cd /opt/stacks/core
run_cmd docker compose up -d || true run_cmd --quiet docker compose up -d
log_success "Core infrastructure deployed" log_success "Core infrastructure deployed"
echo "" echo ""
@@ -1306,7 +1306,7 @@ deploy_infrastructure() {
# Deploy infrastructure stack # Deploy infrastructure stack
cd /opt/stacks/infrastructure cd /opt/stacks/infrastructure
run_cmd docker compose up -d || true run_cmd --quiet docker compose up -d
log_success "Infrastructure stack deployed" log_success "Infrastructure stack deployed"
echo "" echo ""
} }
@@ -1368,7 +1368,7 @@ deploy_dashboards() {
# Deploy dashboards stack # Deploy dashboards stack
cd /opt/stacks/dashboards cd /opt/stacks/dashboards
run_cmd docker compose up -d || true run_cmd --quiet docker compose up -d
log_success "Dashboard stack deployed" log_success "Dashboard stack deployed"
echo "" echo ""
} }
@@ -1399,7 +1399,7 @@ deploy_arcane() {
# Deploy arcane stack # Deploy arcane stack
cd /opt/arcane cd /opt/arcane
run_cmd docker compose up -d || true run_cmd --quiet docker compose up -d
log_success "Arcane stack deployed" log_success "Arcane stack deployed"
echo "" echo ""
} }
@@ -2073,11 +2073,7 @@ deploy_sablier_stack() {
# Deploy # Deploy
log_info "Starting Sablier container..." log_info "Starting Sablier container..."
cd "$sablier_dir" cd "$sablier_dir"
if ! docker compose up -d; then run_cmd --quiet docker compose up -d
log_error "Failed to start Sablier stack"
return 1
fi
log_success "Sablier stack deployed at $sablier_dir" log_success "Sablier stack deployed at $sablier_dir"
} }
@@ -2224,11 +2220,7 @@ EOF
# Deploy # Deploy
log_info "Starting Traefik container..." log_info "Starting Traefik container..."
cd "$traefik_dir" cd "$traefik_dir"
if ! docker compose up -d; then run_cmd --quiet docker compose up -d
log_error "Failed to start Traefik stack"
log_error "Check logs: docker compose -f $traefik_dir/docker-compose.yml logs"
return 1
fi
# Verify container started # Verify container started
if docker ps | grep -q "traefik"; then if docker ps | grep -q "traefik"; then
@@ -2422,9 +2414,23 @@ prepare_deployment() {
# Run command function (handles dry-run and test modes) # Run command function (handles dry-run and test modes)
run_cmd() { run_cmd() {
local quiet=false
if [ "$1" = "--quiet" ]; then
quiet=true
shift
fi
if [ "$DRY_RUN" = true ] || [ "$TEST_MODE" = true ]; then if [ "$DRY_RUN" = true ] || [ "$TEST_MODE" = true ]; then
echo "[DRY-RUN/TEST] $@" echo "[DRY-RUN/TEST] $@"
return 0 return 0
else
if [ "$quiet" = true ]; then
if "$@" > /dev/null 2>&1; then
return 0
else
log_error "Command failed: $@"
return 1
fi
else else
if "$@"; then if "$@"; then
return 0 return 0
@@ -2433,6 +2439,7 @@ run_cmd() {
return 1 return 1
fi fi
fi fi
fi
} }
# Main logic # Main logic