Skip to content

Commit 5fa0d9c

Browse files
author
bmarkons
committed
Wait for postgres and mysql
1 parent 39ede0e commit 5fa0d9c

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

rails/master/runner

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

4+
until pg_isready -h postgres; do
5+
sleep 1
6+
done
7+
8+
while ! mysqladmin ping -h mysql --silent; do
9+
echo "mysql - no response"
10+
sleep 1
11+
done
12+
413
dropdb --if-exists -h postgres -U postgres rubybench
514
createdb -h postgres -U postgres rubybench
615
echo "DROP DATABASE IF EXISTS rubybench" | mysql -u root -h mysql

sequel/master/runner

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

4+
until pg_isready -h postgres; do
5+
sleep 1
6+
done
7+
8+
while ! mysqladmin ping -h mysql --silent; do
9+
echo "mysql - no response"
10+
sleep 1
11+
done
12+
413
dropdb --if-exists -h postgres -U postgres rubybench
514
createdb -h postgres -U postgres rubybench
615
echo "DROP DATABASE IF EXISTS rubybench" | mysql -u root -h mysql

0 commit comments

Comments
 (0)