add database labels

This commit is contained in:
Andras Bacsai
2024-11-02 14:04:59 +01:00
parent 8b2563088d
commit e4d20c1d02
8 changed files with 16 additions and 0 deletions

View File

@@ -51,6 +51,8 @@ class StartClickhouse
], ],
'labels' => [ 'labels' => [
'coolify.managed' => 'true', 'coolify.managed' => 'true',
'coolify.type' => 'database',
'coolify.databaseId' => $this->database->id,
], ],
'healthcheck' => [ 'healthcheck' => [
'test' => "clickhouse-client --password {$this->database->clickhouse_admin_password} --query 'SELECT 1'", 'test' => "clickhouse-client --password {$this->database->clickhouse_admin_password} --query 'SELECT 1'",

View File

@@ -48,6 +48,8 @@ class StartDragonfly
], ],
'labels' => [ 'labels' => [
'coolify.managed' => 'true', 'coolify.managed' => 'true',
'coolify.type' => 'database',
'coolify.databaseId' => $this->database->id,
], ],
'healthcheck' => [ 'healthcheck' => [
'test' => "redis-cli -a {$this->database->dragonfly_password} ping", 'test' => "redis-cli -a {$this->database->dragonfly_password} ping",

View File

@@ -50,6 +50,8 @@ class StartKeydb
], ],
'labels' => [ 'labels' => [
'coolify.managed' => 'true', 'coolify.managed' => 'true',
'coolify.type' => 'database',
'coolify.databaseId' => $this->database->id,
], ],
'healthcheck' => [ 'healthcheck' => [
'test' => "keydb-cli --pass {$this->database->keydb_password} ping", 'test' => "keydb-cli --pass {$this->database->keydb_password} ping",

View File

@@ -45,6 +45,8 @@ class StartMariadb
], ],
'labels' => [ 'labels' => [
'coolify.managed' => 'true', 'coolify.managed' => 'true',
'coolify.type' => 'database',
'coolify.databaseId' => $this->database->id,
], ],
'healthcheck' => [ 'healthcheck' => [
'test' => ['CMD', 'healthcheck.sh', '--connect', '--innodb_initialized'], 'test' => ['CMD', 'healthcheck.sh', '--connect', '--innodb_initialized'],

View File

@@ -49,6 +49,8 @@ class StartMongodb
], ],
'labels' => [ 'labels' => [
'coolify.managed' => 'true', 'coolify.managed' => 'true',
'coolify.type' => 'database',
'coolify.databaseId' => $this->database->id,
], ],
'healthcheck' => [ 'healthcheck' => [
'test' => [ 'test' => [

View File

@@ -45,6 +45,8 @@ class StartMysql
], ],
'labels' => [ 'labels' => [
'coolify.managed' => 'true', 'coolify.managed' => 'true',
'coolify.type' => 'database',
'coolify.databaseId' => $this->database->id,
], ],
'healthcheck' => [ 'healthcheck' => [
'test' => ['CMD', 'mysqladmin', 'ping', '-h', 'localhost', '-u', 'root', "-p{$this->database->mysql_root_password}"], 'test' => ['CMD', 'mysqladmin', 'ping', '-h', 'localhost', '-u', 'root', "-p{$this->database->mysql_root_password}"],

View File

@@ -49,6 +49,8 @@ class StartPostgresql
], ],
'labels' => [ 'labels' => [
'coolify.managed' => 'true', 'coolify.managed' => 'true',
'coolify.type' => 'database',
'coolify.databaseId' => $this->database->id,
], ],
'healthcheck' => [ 'healthcheck' => [
'test' => [ 'test' => [

View File

@@ -50,6 +50,8 @@ class StartRedis
], ],
'labels' => [ 'labels' => [
'coolify.managed' => 'true', 'coolify.managed' => 'true',
'coolify.type' => 'database',
'coolify.databaseId' => $this->database->id,
], ],
'healthcheck' => [ 'healthcheck' => [
'test' => [ 'test' => [