#!/bin/bash

# Load environment
export PATH=$PATH:/usr/local/bin:/opt/homebrew/bin:/opt/anaconda3/bin

# Check if docker is available
if ! command -v docker &> /dev/null; then
    echo "❌ Error: 'docker' command not found."
    exit 1
fi

echo "🛑 Stopping CortexAI services..."
if docker compose down; then
    echo "✅ CortexAI has been stopped successfully."
else
    echo "⚠️ Some services might still be running. Checking..."
    docker ps | grep "ai_"
fi
