Skip to content

An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.

Refactor healthcheck test in StartPostgresql.php

Andras Bacsai5ffbba908be4
diff --git a/app/Actions/Database/StartPostgresql.php b/app/Actions/Database/StartPostgresql.php
index fbbf71f910..edf4a27e1b 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',