Skip to content

Commit

Permalink
Ensure mysql is also running
Browse files Browse the repository at this point in the history
This thing takes a long time to start!
  • Loading branch information
RealOrangeOne committed Aug 1, 2023
1 parent a0c8c28 commit 39e8b67
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions scripts/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,16 @@ docker-compose up -d
echo "> Stop backup container..."
docker-compose stop backup

echo "> Await databases..."
# Only check postgres, that should be fine
echo "> Await postgres..."
until docker-compose exec -T psql pg_isready -U postgres
do
sleep 1
done
echo "> Await mysql..."
until docker-compose exec -T mysql bash -c 'mysqladmin ping --protocol tcp -p$MYSQL_ROOT_PASSWORD'
do
sleep 1
done

echo "> Run backups..."
# Unset `$SCHEDULE` to run just once
Expand Down

0 comments on commit 39e8b67

Please sign in to comment.