Skip to content

Commit

Permalink
Replace external health check with native one
Browse files Browse the repository at this point in the history
Hopefully it will work more reliably.
  • Loading branch information
greg0ire committed Feb 28, 2020
1 parent 7fb5938 commit 8f5b3b4
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tests/travis/install-mysql-5.7.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,16 @@ set -ex
echo "Starting MySQL 5.7..."

sudo docker run \
--health-cmd='mysqladmin ping --silent' \
-d \
-e MYSQL_ALLOW_EMPTY_PASSWORD=yes \
-e MYSQL_DATABASE=doctrine_tests \
-p 33306:3306 \
--name mysql57 \
mysql:5.7

sudo docker exec -i mysql57 bash <<< 'until echo \\q | mysql doctrine_tests > /dev/null 2>&1 ; do sleep 1; done'
until [ "$(sudo docker inspect --format "{{json .State.Health.Status }}" mysql57)" == "\"healthy\"" ]
do
echo "Waiting for MySQL to become ready…"
sleep 1
done

0 comments on commit 8f5b3b4

Please sign in to comment.