From bfddd203ca159b935443ff8ef35ee64d2ecbdfc3 Mon Sep 17 00:00:00 2001 From: hailin Date: Sun, 7 Dec 2025 08:46:00 -0800 Subject: [PATCH] feat(services): add --no-cache option to rebuild-svc command MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Usage: ./deploy.sh rebuild-svc --no-cache 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- backend/services/deploy.sh | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/backend/services/deploy.sh b/backend/services/deploy.sh index 685ee7bc..1224e30e 100755 --- a/backend/services/deploy.sh +++ b/backend/services/deploy.sh @@ -509,13 +509,19 @@ stop_service() { rebuild_service() { local service="$1" + local no_cache="$2" if [ -z "$service" ]; then log_error "Please specify a service name" exit 1 fi log_info "Rebuilding $service..." - docker compose -f "$COMPOSE_FILE" --env-file "$ENV_FILE" build "$service" + if [ "$no_cache" = "--no-cache" ]; then + log_info "Building without cache..." + docker compose -f "$COMPOSE_FILE" --env-file "$ENV_FILE" build --no-cache "$service" + else + docker compose -f "$COMPOSE_FILE" --env-file "$ENV_FILE" build "$service" + fi docker compose -f "$COMPOSE_FILE" --env-file "$ENV_FILE" up -d "$service" } @@ -570,7 +576,7 @@ case "${1:-}" in stop_service "$2" ;; rebuild-svc) - rebuild_service "$2" + rebuild_service "$2" "$3" ;; infra-up) infra_up @@ -610,7 +616,7 @@ case "${1:-}" in echo "Single Service Commands:" echo " start-svc - Start a specific service" echo " stop-svc - Stop a specific service" - echo " rebuild-svc - Rebuild and restart a specific service" + echo " rebuild-svc [--no-cache] - Rebuild and restart a specific service" echo "" echo "Infrastructure Commands:" echo " infra-up - Start infrastructure (postgres, redis, kafka)"