forked from UtkarshShah0/E-Commerce-Microservices
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart_all.sh
More file actions
executable file
·62 lines (51 loc) · 1.74 KB
/
start_all.sh
File metadata and controls
executable file
·62 lines (51 loc) · 1.74 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
#!/bin/bash
echo "Starting OSS Application..."
# Kill existing java and node processes
killall -9 java node 2>/dev/null
# Start Eureka Server
echo "Starting Eureka Server..."
cd oss-backend/eureka-server
nohup ./mvnw spring-boot:run > ../../eureka.log 2>&1 &
echo "Eureka Server started (PID: $!). Logs in eureka.log"
cd ../..
sleep 15
# Start configuration dependent services
echo "Starting API Gateway..."
cd oss-backend/api-gateway
nohup ./mvnw spring-boot:run > ../../gateway.log 2>&1 &
echo "API Gateway started (PID: $!). Logs in gateway.log"
cd ../..
echo "Starting User Service..."
cd oss-backend/user-service
nohup ./mvnw spring-boot:run > ../../user.log 2>&1 &
echo "User Service started (PID: $!). Logs in user.log"
cd ../..
echo "Starting Product Catalog..."
cd oss-backend/product-catalog
nohup ./mvnw spring-boot:run > ../../product.log 2>&1 &
echo "Product Catalog started (PID: $!). Logs in product.log"
cd ../..
echo "Starting Order Management..."
cd oss-backend/order-management-master
nohup ./mvnw spring-boot:run > ../../order.log 2>&1 &
echo "Order Management started (PID: $!). Logs in order.log"
cd ../..
echo "Starting Payment Service..."
cd oss-backend/payment-processing-service-master
nohup ./mvnw spring-boot:run > ../../payment.log 2>&1 &
echo "Payment Service started (PID: $!). Logs in payment.log"
cd ../..
echo "Starting Cart Service..."
cd oss-backend/cart-service
nohup ./mvnw spring-boot:run > ../../cart.log 2>&1 &
echo "Cart Service started (PID: $!). Logs in cart.log"
cd ../..
echo "Waiting for backend services to initialize..."
sleep 30
# Start Frontend
echo "Starting Frontend..."
cd oss-frontend
nohup npm start > ../frontend.log 2>&1 &
echo "Frontend started (PID: $!). Logs in frontend.log"
cd ..
echo "All services started!"