-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathrun.sh
executable file
·50 lines (35 loc) · 1.2 KB
/
run.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
trap killall SIGINT
killall(){
echo "Killing containers..."
docker kill finance_db
docker kill finance_mq
docker kill datagen
echo "Removing containers..."
docker rm finance_db
docker rm finance_mq
docker rm datagen
echo "Killing other processes..."
kill 0
}
checkhealth(){
[ "$(docker ps -a | grep $python)" ] && [[ $(docker inspect --format "{{.State.Health.Status}}" $python) == "healthy" ]]
return
}
export SPRING_DATASOURCE_URL=jdbc:mysql://127.0.0.1:5000/ies
export SPRING_DATASOURCE_USERNAME=ies
export SPRING_DATASOURCE_PASSWORD=password
export FINANCE_RABBITMQ_HOST=127.0.0.1
docker run --name finance_db --health-cmd='mysqladmin ping' -e MYSQL_DATABASE=ies -e MYSQL_USER=ies -e MYSQL_PASSWORD=password -e MYSQL_ROOT_PASSWORD=password -p 5000:3306 mysql:8.0.27 &
docker run --name finance_mq --health-cmd='rabbitmq-diagnostics -q status' -p 5672:5672 rabbitmq:3.9-alpine &
sleep 1
sleep 30;
cd ./projDataGenerator
docker build -t datagen .
docker run --name datagen --add-host host.docker.internal:host-gateway -e FINANCE_RABBITMQ_HOST='host.docker.internal' datagen &
sleep 30;
cd ../projBackend/finance
./mvnw spring-boot:run &
sleep 30
cd ../../projFrontend
ng serve &
wait