-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart.sh
More file actions
65 lines (59 loc) · 1.53 KB
/
Copy pathstart.sh
File metadata and controls
65 lines (59 loc) · 1.53 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#!/bin/bash
# Smart Serve Project Startup Script
echo "Starting Smart Serve Project..."
echo "================================="
# Function to start frontend
start_frontend() {
echo "Starting Frontend (Vue3)..."
cd frontend
npm run dev &
cd ..
}
# Function to start backend
start_backend() {
local profile="${SPRING_PROFILE:-dev}"
echo "Starting Backend (Spring Boot) with profile: $profile..."
cd backend
mvn spring-boot:run -Dspring-boot.run.profiles=$profile &
cd ..
}
# Function to start LLM service
start_llm() {
echo "Starting LLM Service (Python)..."
cd llm
source venv/bin/activate 2>/dev/null || python -m venv venv && source venv/bin/activate
pip install -r requirements.txt 2>/dev/null
python api/app.py &
cd ..
}
# Check command line arguments
case "$1" in
"frontend")
start_frontend
;;
"backend")
start_backend
;;
"llm")
start_llm
;;
"all")
start_frontend
sleep 5
start_backend
sleep 5
start_llm
echo "All services started!"
echo "Frontend: http://localhost:3000"
echo "Backend: http://localhost:8080"
echo "LLM Service: http://localhost:5000"
;;
*)
echo "Usage: $0 {frontend|backend|llm|all}"
echo " frontend - Start only the frontend"
echo " backend - Start only the backend"
echo " llm - Start only the LLM service"
echo " all - Start all services"
exit 1
;;
esac