fix(database): honor disabled standalone health checks

Skip Docker healthcheck configuration when standalone database health checks are disabled, and document default health check settings in the database API schema.
This commit is contained in:
Andras Bacsai committed 2026-06-01 08:55:03 +02:00
1 parent 4f053bf5b4
commit 51062e73a6
25 files changed
+283 -115

No files matched your search

+3 -7
View File
@@ -110,13 +110,9 @@ class StartPostgresql
$this->database->destination->network,
],
'labels' => defaultDatabaseLabels($this->database)->toArray(),
'healthcheck' => [
'test' => ['CMD', 'psql', '-U', (string) $this->database->postgres_user, '-d', (string) $this->database->postgres_db, '-c', 'SELECT 1'],
'interval' => "{$this->database->health_check_interval}s",
'timeout' => "{$this->database->health_check_timeout}s",
'retries' => $this->database->health_check_retries,
'start_period' => "{$this->database->health_check_start_period}s",
],
'healthcheck' => $this->database->healthCheckConfiguration([
'CMD', 'psql', '-U', (string) $this->database->postgres_user, '-d', (string) $this->database->postgres_db, '-c', 'SELECT 1',
]),
'mem_limit' => $this->database->limits_memory,
'memswap_limit' => $this->database->limits_memory_swap,
'mem_swappiness' => $this->database->limits_memory_swappiness,