From 19c78af88c3eeb9c881c3a49216145a83e8cee1d Mon Sep 17 00:00:00 2001 From: teriiehina Date: Tue, 23 Nov 2021 00:28:17 -1000 Subject: [PATCH] Update app-entrypoint.sh (#151) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Update app-entrypoint.sh Some database references were hard-coded to "mariadb" in the `app-entrypoint.sh` file. They have been replaced by the corresponding variable. Also, the port number has been added to the log output to help any missing configuration when using another DB engine than MariaDB. * Update 8/debian-10/rootfs/app-entrypoint.sh Co-authored-by: Miguel Ángel Cabrera Miñagorri * Update 8/debian-10/rootfs/app-entrypoint.sh Co-authored-by: Miguel Ángel Cabrera Miñagorri Co-authored-by: Miguel Ángel Cabrera Miñagorri --- bitnami/laravel/8/debian-10/rootfs/app-entrypoint.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bitnami/laravel/8/debian-10/rootfs/app-entrypoint.sh b/bitnami/laravel/8/debian-10/rootfs/app-entrypoint.sh index 3b47291ef58c..583317903d7d 100755 --- a/bitnami/laravel/8/debian-10/rootfs/app-entrypoint.sh +++ b/bitnami/laravel/8/debian-10/rootfs/app-entrypoint.sh @@ -62,11 +62,11 @@ wait_for_db() { local db_address db_address=$(getent hosts "$db_host" | awk '{ print $1 }') local counter=0 - log "Connecting to mariadb at $db_address" + log "Connecting to database at ${db_address}:${db_port}" while ! nc -z "$db_address" "$db_port" >/dev/null; do counter=$((counter + 1)) if [ $counter == 30 ]; then - log "Error: Couldn't connect to mariadb." + log "Error: Couldn't connect to the database" exit 1 fi log "Trying to connect to mariadb at $db_address. Attempt $counter."