42 lines
1.0 KiB
Bash
Executable File
42 lines
1.0 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
# Colors
|
|
GREEN='\033[0;32m'
|
|
RED='\033[0;31m'
|
|
YELLOW='\033[1;33m'
|
|
NC='\033[0m' # No Color
|
|
|
|
echo -e "${RED}🛑 Stopping MinAttest Development Environment...${NC}"
|
|
|
|
# Function to kill process on a port
|
|
kill_port() {
|
|
PORT=$1
|
|
NAME=$2
|
|
PID=$(lsof -ti:$PORT)
|
|
if [ -n "$PID" ]; then
|
|
echo -e "${YELLOW} Killing $NAME (Port $PORT, PID $PID)...${NC}"
|
|
kill -9 $PID
|
|
echo -e "${GREEN} $NAME stopped.${NC}"
|
|
else
|
|
echo -e " $NAME is not running (Port $PORT free)."
|
|
fi
|
|
}
|
|
|
|
# 1. Stop Backend (API) - Port 7172
|
|
kill_port 7172 "Backend (API)"
|
|
|
|
# 2. Stop BFF - Port 10001
|
|
kill_port 10001 "BFF"
|
|
|
|
# 3. Stop Frontend - Port 5173
|
|
kill_port 5173 "Frontend"
|
|
|
|
# 4. Stop Aspire Dashboard & Resources (Cleanup)
|
|
echo -e "${YELLOW} Cleaning up Aspire ports...${NC}"
|
|
kill_port 17105 "Aspire AppHost (HTTPS)"
|
|
kill_port 15182 "Aspire AppHost (HTTP)"
|
|
kill_port 21157 "Aspire Dashboard (OTLP)"
|
|
kill_port 22256 "Aspire Resource Service"
|
|
|
|
echo -e "${GREEN}✨ All services stopped.${NC}"
|