diff options
author | Jerry Flood <jflood@att.com> | 2019-02-25 15:02:53 -0500 |
---|---|---|
committer | Jerry Flood <jflood@att.com> | 2019-02-25 15:03:20 -0500 |
commit | c98ae2d0bd8ef115e5302d421a751b6f5c3d838d (patch) | |
tree | 115d138feb840bf03e1732cc63dfd97ac2523a63 /cmso-robot/docker/etc/startDbinitService.sh | |
parent | f168a37fc269e58e77ad10969960ef84446a47ee (diff) |
Add build of robot container
Issue-ID: OPTFRA-393
Change-Id: Ifa0ea6100f997793ccafe2164318bc802d75700a
Signed-off-by: Jerry Flood <jflood@att.com>
Diffstat (limited to 'cmso-robot/docker/etc/startDbinitService.sh')
-rw-r--r-- | cmso-robot/docker/etc/startDbinitService.sh | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/cmso-robot/docker/etc/startDbinitService.sh b/cmso-robot/docker/etc/startDbinitService.sh new file mode 100644 index 0000000..e6d6d9f --- /dev/null +++ b/cmso-robot/docker/etc/startDbinitService.sh @@ -0,0 +1,17 @@ +#!/bin/sh +apt update +apt install netcat --assume-yes +COUNTER=10 +while [ $COUNTER -gt 0 ]; do + nc -z ${DB_HOST} 3306 + if [ $? -eq 0 ]; then + let COUNTER=0 + else + let COUNTER=COUNTER-1 + sleep 10 + fi +done + +echo "VM_ARGS="${VM_ARGS} + +java -Djava.security.egd=file:/dev/./urandom ${VM_ARGS} -Xms256m -Xmx1024m -jar ./app.jar --spring.config.location=/share/etc/config/liquibase.properties |