From cc260e32bdb3eb8b76c074b26d4bd981c3441ac5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20van=20Drunen?= Date: Sat, 9 Dec 2023 20:47:59 +0100 Subject: [PATCH] Fix issue with database host and port used by wait-for-it --- docker/entrypoint.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh index b4cfd342..950e3b8d 100755 --- a/docker/entrypoint.sh +++ b/docker/entrypoint.sh @@ -8,8 +8,8 @@ fi php artisan config:cache -databaseHost=$(awk -F= '$1 == "DB_HOST" {print $2}' .env) -databasePort=$(awk -F= '$1 == "DB_PORT" {print $2}' .env) +databaseHost=$(php artisan tinker --execute="echo config('database.connections.mysql.host')") +databasePort=$(php artisan tinker --execute="echo config('database.connections.mysql.port')") ./docker/wait-for-it.sh $databaseHost:$databasePort -t 90 -- php artisan migrate --force