From 5ffbba908be40e242d943eae13d74a600649eaf2 Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Fri, 12 Jan 2024 15:41:49 +0100 Subject: [PATCH] Refactor healthcheck test in StartPostgresql.php --- app/Actions/Database/StartPostgresql.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/app/Actions/Database/StartPostgresql.php b/app/Actions/Database/StartPostgresql.php index fbbf71f91..edf4a27e1 100644 --- a/app/Actions/Database/StartPostgresql.php +++ b/app/Actions/Database/StartPostgresql.php @@ -50,12 +50,8 @@ class StartPostgresql ], 'healthcheck' => [ 'test' => [ - 'CMD-SHELL', - 'pg_isready', - '-d', - $this->database->postgres_db, - '-U', - $this->database->postgres_user, + "CMD-SHELL", + "psql -U {$this->database->postgres_user} -d {$this->database->postgres_db} -c 'SELECT 1' || exit 1" ], 'interval' => '5s', 'timeout' => '5s',