Files
KNEL-AIMiddleware/scripts/StatusCheck.sh
T
mrcharles b595e26d62 fix: add profile flags to all docker compose commands and complete env vars
All services in docker-compose.yml are behind profiles (dev/ops), but the
maintenance scripts called docker compose without --profile, so no services
were detected or built. Added --profile dev --profile ops to BuildAll.sh,
StatusCheck.sh, and all relevant maintenance.sh commands.

Also:
- Added missing env vars for 8 newer servers to .env.example (beszel, gitea,
  grafana, ha, limesurvey, linkwarden, superset)
- Fixed maintenance.sh validate to use validate-all.sh instead of nonexistent
  validate-mcp.sh
2026-07-30 12:15:49 -05:00

66 lines
1.7 KiB
Bash
Executable File

#!/bin/bash
# StatusCheck.sh
# Script to check build status of all MCP/LSP services
set -e # Exit on error
# Colors for output
GREEN='\033[0;32m'
RED='\033[0;31m'
YELLOW='\033[1;33m'
BLUE='\033[0;34m'
NC='\033[0m' # No Color
echo -e "${BLUE}=== KNEL-AIMiddleware Service Status Check ===${NC}"
echo ""
# Change to project root (parent of scripts/)
cd "$(dirname "${BASH_SOURCE[0]}")/.."
# Get list of all services from docker-compose.yml (include all profiles)
SERVICES=$(docker compose --profile dev --profile ops config --services | sort)
# Counters
TOTAL=0
BUILT=0
NOT_BUILT=0
echo "Checking Docker images for all services..."
echo ""
for SERVICE in $SERVICES; do
TOTAL=$((TOTAL + 1))
# Construct expected image name
IMAGE_NAME="kneldevstack-aimiddleware-$SERVICE"
# Check if image exists
if docker images --format '{{.Repository}}' | grep -q "^${IMAGE_NAME}$"; then
echo -e "${GREEN}${NC} $SERVICE (image exists)"
BUILT=$((BUILT + 1))
else
echo -e "${RED}${NC} $SERVICE (not built)"
NOT_BUILT=$((NOT_BUILT + 1))
fi
done
echo ""
echo -e "${BLUE}=== Summary ===${NC}"
echo -e "Total services: $TOTAL"
echo -e "${GREEN}Built: $BUILT${NC}"
echo -e "${RED}Not built: $NOT_BUILT${NC}"
echo ""
# Show STATUS.md
if [ -f "STATUS.md" ]; then
echo -e "${BLUE}=== STATUS.md Summary ===${NC}"
grep -c "Built" STATUS.md | xargs -I {} echo -e "${GREEN}Built: {}${NC}"
grep -c "Pending" STATUS.md | xargs -I {} echo -e "${YELLOW}Pending: {}${NC}"
echo ""
fi
echo "Next steps:"
echo " - To build missing services: docker compose build <service-name>"
echo " - To build all services: ./BuildAll.sh"
echo " - To view detailed status: cat STATUS.md"