mirror of
https://github.com/bitnami/containers.git
synced 2026-02-20 14:57:23 +08:00
Merge pull request #7 from sameersbn/use-nc
use `nc` for database server connection test
This commit is contained in:
@@ -19,7 +19,7 @@ wait_for_db() {
|
||||
mariadb_address=$(getent hosts mariadb | awk '{ print $1 }')
|
||||
counter=0
|
||||
log "Connecting to mariadb at $mariadb_address"
|
||||
while ! curl --silent mariadb:3306 >/dev/null; do
|
||||
while ! nc -z mariadb 3306; do
|
||||
counter=$((counter+1))
|
||||
if [ $counter == 30 ]; then
|
||||
log "Error: Couldn't connect to mariadb."
|
||||
|
||||
Reference in New Issue
Block a user