Skip to content

Commit

Permalink
Test for docker compose
Browse files Browse the repository at this point in the history
  • Loading branch information
driv3r committed Sep 11, 2024
1 parent 10e6eb0 commit 95cb40f
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions .github/workflows/start-mysql.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,25 @@ set -xe

DOCKER_COMPOSE_VERSION=v2.2.3

sudo apt-get update
sudo apt-get install -y netcat-openbsd make gcc
# sudo apt-get update
# sudo apt-get install -y netcat-openbsd make gcc

sudo curl -o /usr/local/bin/docker-compose -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m`
sudo chmod +x /usr/local/bin/docker-compose
# sudo curl -o /usr/local/bin/docker-compose -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m`
# sudo chmod +x /usr/local/bin/docker-compose

cmd=if ! type "$docker-compose" > /dev/null; then
"docker-compose"
else
"podman-compose"
fi

if [ "$MYSQL_VERSION" == "8.0" ]; then
docker-compose -f docker-compose_8.0.yml up -d mysql-1 mysql-2
$cmd -f docker-compose_8.0.yml up -d mysql-1 mysql-2
else
docker-compose up -d mysql-1 mysql-2
$cmd up -d mysql-1 mysql-2
fi


MAX_ATTEMPTS=60

function wait_for_version () {
Expand Down

0 comments on commit 95cb40f

Please sign in to comment.