-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathundeployFrankStack.sh
More file actions
executable file
·68 lines (57 loc) · 1.8 KB
/
Copy pathundeployFrankStack.sh
File metadata and controls
executable file
·68 lines (57 loc) · 1.8 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
66
67
68
#!/bin/bash
# ==========================================================
# undeployFrankStack.sh
# undeploy the Frank Stack on a Linux system
#
# Author: Edoardo Sabatini
# Date: 03 November 2025
# ==========================================================
echo "Undeployment of Frank Stack"
echo "-------------------------------------------"
# ==========================================================
echo "Stage 1: Frontend undeployment..."
./undeployFrontEnd.sh
# ==========================================================
echo "Stage 2: Node.js undeployment..."
docker-compose -f docker-compose.yml down
if [ $? -eq 0 ]; then
echo "Stage 1 undeployed successfully!"
else
echo "Undeployment failed. Please check the logs for more details."
exit 1
fi
# ==========================================================
echo "Stage 3: Java undeployment..."
cd frank-spring || {
echo "Error: directory frank-stack-spring not found!"
exit 1
}
docker-compose -f docker-compose.yml down
if [ $? -eq 0 ]; then
echo "Stage 2 undeployed successfully!"
else
echo "Undeployment failed. Please check the logs for more details."
exit 1
fi
# ==========================================================
echo "Stage 4: AWS undeployment..."
cd ../frank-aws || {
echo "Error: directory frank-stack-aws not found!"
exit 1
}
./stop-full-stack.sh
if [ $? -eq 0 ]; then
echo "Stage 3 undeployed successfully!"
else
echo "Undeployment failed. Please check the logs for more details."
exit 1
fi
# ==========================================================
# Final cleanup
# Docker remove dangling images, unused volumes, and networks
echo "-------------------------------------------"
echo "Stage 5: Final cleanup..."
cd ..
./deadClean.sh
echo "Undeployment script finished."
# End of undeployFrankStack.sh