La inn script for start og stopp av MinAttest i development.
This commit is contained in:
Executable
+41
@@ -0,0 +1,41 @@
|
||||
#!/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}"
|
||||
Reference in New Issue
Block a user