-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathstart.sh
More file actions
executable file
·18 lines (14 loc) · 821 Bytes
/
start.sh
File metadata and controls
executable file
·18 lines (14 loc) · 821 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
tmpnetworkname="testwifi"
tmpcontainername="mysql1"
docker-compose up -d $tmpcontainername
tmpcontainerName=$(docker-compose ps | grep $tmpcontainername | awk '{print $1}')
tmpnetworkIp=$(docker inspect --format '{{ .NetworkSettings.Networks.'$tmpnetworkname'.IPAddress }}' $tmpcontainerName)
./wait-for-it.sh $tmpnetworkIp:3306 -- echo "$tmpcontainername is start success"
tmpcontainername="mysql2"
docker-compose up -d $tmpcontainername
tmpcontainerName=$(docker-compose ps | grep $tmpcontainername | awk '{print $1}')
tmpnetworkIp=$(docker inspect --format '{{ .NetworkSettings.Networks.'$tmpnetworkname'.IPAddress }}' $tmpcontainerName)
./wait-for-it.sh $tmpnetworkIp:3306 -- echo "$tmpcontainername is start success"
tmpcontainername="kingshard"
echo "start kingshard"
docker-compose up -d $tmpcontainername