#!/bin/bash # BuildAll.sh # Script to build all MCP/LSP services in KNEL-AIMiddleware set -e # Exit on error # Colors for output RED='\033[0;31m' GREEN='\033[0;32m' YELLOW='\033[1;33m' BLUE='\033[0;34m' NC='\033[0m' # No Color echo -e "${GREEN}=== KNEL-AIMiddleware Build Script ===${NC}" echo "" echo "Building all services..." echo "" # Change to project directory cd "$(dirname "${BASH_SOURCE[0]}")" # Get list of all services from docker-compose.yml SERVICES=$(docker compose config --services) # Build each service for SERVICE in $SERVICES; do echo -e "${BLUE}Building: ${SERVICE}${NC}" if docker compose build "$SERVICE" 2>&1 | tail -5; then echo -e "${GREEN}✓${NC} Successfully built $SERVICE" else echo -e "${RED}✗${NC} Failed to build $SERVICE" echo -e "${YELLOW}Continuing with next service...${NC}" fi echo "" done echo -e "${GREEN}=== Build complete! ===${NC}" echo "" echo "To start all services:" echo " docker compose up -d --profile dev" echo "" echo "To check status:" echo " docker ps"