--- /dev/null
+#!/bin/bash
+
+if [ "$1" = "cleanup" ]
+then
+ docker-compose down -v
+ mvn clean
+ docker image rm juplo/data-jdbc:latest
+ exit
+fi
+
+if [[
+ $(docker image ls -q juplo/data-jdbc:latest) == "" ||
+ "$1" = "build"
+]]
+then
+ mvn package || exit
+else
+ echo "Using image existing images:"
+ docker image ls juplo/data-jdbc:latest
+fi
+
+docker-compose up -d jdbc
+
+while ! [[ $(http :8080/actuator/health 2>/dev/null | jq -r .status) == "UP" ]];
+do
+ echo "Waiting for User-Service...";
+ sleep 1;
+done
+
+
+docker-compose logs --tail=0 -f jdbc &
+
+for i in `seq 1 20`;
+do
+ echo peter$i | http :8080/users
+ echo uwe$i | http :8080/users
+ echo peter$i | http :8080/users
+ echo simone$i | http :8080/users
+ http DELETE :8080/users/franz$i
+ http DELETE :8080/users/simone$i
+ echo franz$i | http :8080/users
+ echo franz$i | http :8080/users
+ echo beate$i | http :8080/users
+ http DELETE :8080/users/uwe$i
+ sleep 1
+done;
+
+docker-compose stop
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>de.juplo.boot.data</groupId>
- <artifactId>jdbc</artifactId>
+ <artifactId>data-jdbc</artifactId>
<version>0.0.1-SNAPSHOT</version>
- <name>data-jdbc</name>
+ <name>Data JDBC</name>
<description>Simple web-app example for spring-boot-data-jdbc</description>
<properties>
<configuration>
<images>
<image>
- <name>%a:%l</name>
+ <name>juplo/%a:latest</name>
</image>
</images>
</configuration>