-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart_cortex.sh
More file actions
executable file
·49 lines (39 loc) · 1.38 KB
/
start_cortex.sh
File metadata and controls
executable file
·49 lines (39 loc) · 1.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#!/bin/bash
set -e
# ANSI Colors
GREEN='\033[0;32m'
CYAN='\033[0;36m'
YELLOW='\033[1;33m'
NC='\033[0m' # No Color
echo -e "${CYAN}[INFO] Initializing Adraca Command Center Launch Sequence...${NC}"
# 1. Clean up old state
echo -e "${CYAN}[INFO] Stopping existing containers...${NC}"
docker-compose down
# 2. Build and Start
echo -e "${CYAN}[INFO] Building containers...${NC}"
docker-compose build
echo -e "${CYAN}[INFO] Starting services...${NC}"
docker-compose up -d
# 3. Health Check Loop for Neo4j
echo -e "${YELLOW}[WAIT] Waiting for Knowledge Graph to initialize...${NC}"
while true; do
HEALTH=$(docker inspect --format='{{.State.Health.Status}}' neo4j-db 2>/dev/null || echo "starting")
if [ "$HEALTH" == "healthy" ]; then
echo -e "${GREEN}[SUCCESS] Knowledge Graph is healthy!${NC}"
break
fi
printf "."
sleep 2
done
echo ""
# 4. Final Output
echo -e "${GREEN}[SUCCESS] System Online & Operational${NC}"
echo -e "${CYAN}------------------------------------------------${NC}"
echo -e "Dashboard: ${GREEN}http://localhost:8501${NC}"
echo -e "Neo4j Browser: ${YELLOW}http://localhost:7474${NC}"
echo -e "${CYAN}------------------------------------------------${NC}"
# 5. Log Follow Prompt
echo -e "${YELLOW}Press [Enter] to follow logs, or Ctrl+C to exit.${NC}"
read
docker-compose logs -f
# Reminder to user: Ensure this script is executable with: chmod +x start_cortex.sh