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)"