-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstart.sh
executable file
·51 lines (44 loc) · 1.33 KB
/
start.sh
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
#!/bin/bash
# Function to check if a command exists
command_exists () {
command -v "$1" >/dev/null 2>&1 ;
}
# Check if Java is installed
if ! command_exists java; then
echo "Java is not installed. Please install Java and try again."
exit 1
fi
# Check if Docker is installed
if ! command_exists docker; then
echo "Docker is not installed. Please install Docker and try again."
exit 1
fi
# Check if Docker Compose is installed
if ! command_exists docker-compose; then
echo "Docker Compose is not installed. Please install Docker Compose and try again."
exit 1
fi
# List of subfolders to navigate and run `make build`
subfolders=("notrace" "resttemplate" "webflux")
# Loop through each subfolder and run `make build`
for folder in "${subfolders[@]}"; do
if [ -d "$folder" ]; then
echo "Entering $folder"
cd "$folder" || exit
if make build; then
echo "Build successful in $folder"
else
echo "Build failed in $folder"
exit 1
fi
cd - || exit
else
echo "Directory $folder does not exist"
exit 1
fi
done
# Run `docker compose up -d`
echo "Running docker compose up -d"
docker-compose up -d
echo "http://localhost:16686 Jaeger UI"
echo "curl http://localhost:8091/web/notrace"