#!/bin/bash # # OrbiQuant IA - Stop All Services # set -e RED='\033[0;31m' GREEN='\033[0;32m' YELLOW='\033[1;33m' NC='\033[0m' BOLD='\033[1m' PROJECT_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" echo -e "${BOLD}Stopping OrbiQuant IA services...${NC}\n" # Stop Docker services if [ -f "$PROJECT_ROOT/docker-compose.services.yml" ]; then echo -e "${YELLOW}Stopping Docker Compose services...${NC}" cd "$PROJECT_ROOT" docker-compose -f docker-compose.services.yml down 2>/dev/null || true fi # Kill tmux session if exists if command -v tmux &> /dev/null; then if tmux has-session -t orbiquant 2>/dev/null; then echo -e "${YELLOW}Killing tmux session...${NC}" tmux kill-session -t orbiquant fi fi # Kill processes on known ports PORTS=(5173 3000 8001 8003 8004) for port in "${PORTS[@]}"; do pid=$(lsof -ti :$port 2>/dev/null || true) if [ -n "$pid" ]; then echo -e "${YELLOW}Killing process on port $port (PID: $pid)${NC}" kill -9 $pid 2>/dev/null || true fi done echo -e "\n${GREEN}All services stopped!${NC}"