3 IMAGE=juplo/supersimple:1.0-SNAPSHOT
5 if [ "$1" = "cleanup" ]
12 docker-compose rm -svf supersimple
13 docker-compose up -d zookeeper kafka-1 kafka-2 kafka-3 cli
16 $(docker image ls -q $IMAGE) == "" ||
20 docker-compose rm -svf supersimple
21 mvn clean install || exit
23 echo "Using image existing images:"
24 docker image ls $IMAGE
27 echo "Waiting for the Kafka-Cluster to become ready..."
28 docker-compose exec cli cub kafka-ready -b kafka:9092 1 60 > /dev/null 2>&1 || exit 1
29 docker-compose up setup
30 docker-compose up -d gateway requests-1 requests-2 supersimple
32 while ! [[ $(http 0:8080/actuator/health 2> /dev/null) =~ "UP" ]]; do echo "Waiting for gateway..."; sleep 1; done
33 while ! [[ $(http 0:8081/actuator/health 2> /dev/null) =~ "UP" ]]; do echo "Waiting for requests-1..."; sleep 1; done
34 while ! [[ $(http 0:8082/actuator/health 2> /dev/null) =~ "UP" ]]; do echo "Waiting for requests-2..."; sleep 1; done
36 echo 6 | http -v :8080/peter
40 docker-compose logs supersimple