Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions modules/app_stack/scripts/mysql_setup.sh.tftpl
Original file line number Diff line number Diff line change
Expand Up @@ -113,16 +113,16 @@ docker run -d \
mysql:8.4.8

MYSQL_READY=false
for i in $(seq 1 30); do
if docker exec mysql-server mysqladmin ping -uroot -p"$DB_ROOT_PASS" 2>/dev/null; then
for i in $(seq 1 90); do
if docker exec mysql-server mysql -uroot -p"$DB_ROOT_PASS" -e "SELECT 1" >/dev/null 2>&1; then
MYSQL_READY=true
break
fi
sleep 2
done

if [ "$MYSQL_READY" != "true" ]; then
echo "MySQL container did not become ready within 60 seconds." >&2
echo "MySQL container did not become ready for authenticated root queries within 180 seconds." >&2
docker logs --tail 100 mysql-server >&2 || true
exit 1
fi
Expand Down
Loading