Skip to content

Commit 57ebef0

Browse files
committed
Added start-services.sh
1 parent 99b76a7 commit 57ebef0

File tree

4 files changed

+23
-1
lines changed

4 files changed

+23
-1
lines changed

build-and-test-all.sh

+4
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33

44
docker-compose down -v
5+
docker-compose up -d --build mysql
6+
7+
./wait-for-mysql.sh
8+
59
docker-compose up -d --build eventuatelocalcdcservice tramcdcservice
610

711
./gradlew -x :ftgo-end-to-end-tests:test build

mysql-cli.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#! /bin/bash -e
22

3-
docker run -it \
3+
docker run $* \
44
--network ftgoorderservice_default \
55
--name mysqlterm --rm mysql:5.7.13 \
66
sh -c 'exec mysql -hmysql -P3306 -uroot -prootpassword eventuate'

start-services.sh

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#! /bin/bash -e
2+
3+
docker-compose up -d mysql
4+
5+
./wait-for-mysql.sh
6+
7+
docker-compose up -d
8+
9+
echo -n waiting for the services to start...
10+
11+
./wait-for-services.sh

wait-for-mysql.sh

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#! /bin/sh
2+
3+
until (echo select 1 from dual | ./mysql-cli.sh -i > /dev/null)
4+
do
5+
echo sleeping for mysql
6+
sleep 5
7+
done

0 commit comments

Comments
 (0)