Integrate Coolify API client and module for managing Coolify services, enhancing automation and deployment processes.

This commit is contained in:
Jeppe Bundgaard
2026-05-19 13:17:07 +02:00
parent ab31cd6dbb
commit 00a8723347
69 changed files with 16632 additions and 215 deletions
@@ -0,0 +1,29 @@
<?php
namespace failover\config;
use Exception;
use traits\module_config_variable;
class failover_database_enabled_c
{
use module_config_variable;
/**
* @throws Exception
*/
public function __construct()
{
self::setupConfigVariable(
'Failover',
'database_enabled',
'bool',
true,
null,
'Whether automatic database replica failover is enabled.',
'false',
false,
'false'
);
}
}
@@ -0,0 +1,29 @@
<?php
namespace failover\config;
use Exception;
use traits\module_config_variable;
class failover_enabled_c
{
use module_config_variable;
/**
* @throws Exception
*/
public function __construct()
{
self::setupConfigVariable(
'Failover',
'enabled',
'bool',
true,
null,
'Whether automatic failover is enabled.',
'false',
false,
'false'
);
}
}
@@ -0,0 +1,29 @@
<?php
namespace failover\config;
use Exception;
use traits\module_config_variable;
class failover_max_status_age_seconds_c
{
use module_config_variable;
/**
* @throws Exception
*/
public function __construct()
{
self::setupConfigVariable(
'Failover',
'max_status_age_seconds',
'int',
true,
null,
'Maximum age in seconds for a stored replica status to be eligible for automatic failover.',
'90',
false,
'90'
);
}
}
@@ -0,0 +1,29 @@
<?php
namespace failover\config;
use Exception;
use traits\module_config_variable;
class failover_minio_enabled_c
{
use module_config_variable;
/**
* @throws Exception
*/
public function __construct()
{
self::setupConfigVariable(
'Failover',
'minio_enabled',
'bool',
true,
null,
'Whether automatic MinIO replica failover is enabled.',
'false',
false,
'false'
);
}
}
@@ -0,0 +1,29 @@
<?php
namespace failover\config;
use Exception;
use traits\module_config_variable;
class failover_redis_enabled_c
{
use module_config_variable;
/**
* @throws Exception
*/
public function __construct()
{
self::setupConfigVariable(
'Failover',
'redis_enabled',
'bool',
true,
null,
'Whether automatic Redis replica failover is enabled.',
'false',
false,
'false'
);
}
}
@@ -0,0 +1,45 @@
<?php
namespace failover;
require_once WD . '/modules/failover/config/failover_enabled_c.php';
require_once WD . '/modules/failover/config/failover_database_enabled_c.php';
require_once WD . '/modules/failover/config/failover_redis_enabled_c.php';
require_once WD . '/modules/failover/config/failover_minio_enabled_c.php';
require_once WD . '/modules/failover/config/failover_max_status_age_seconds_c.php';
use failover\config\failover_database_enabled_c;
use failover\config\failover_enabled_c;
use failover\config\failover_max_status_age_seconds_c;
use failover\config\failover_minio_enabled_c;
use failover\config\failover_redis_enabled_c;
use traits\module_config_t;
class failover_c
{
use module_config_t;
public failover_enabled_c $enabled;
public failover_database_enabled_c $database_enabled;
public failover_redis_enabled_c $redis_enabled;
public failover_minio_enabled_c $minio_enabled;
public failover_max_status_age_seconds_c $max_status_age_seconds;
public function __construct()
{
$this->setupConfig('Failover');
$this->allowUpdate([
failover_enabled_c::class,
failover_database_enabled_c::class,
failover_redis_enabled_c::class,
failover_minio_enabled_c::class,
failover_max_status_age_seconds_c::class,
]);
$this->enabled = new failover_enabled_c();
$this->database_enabled = new failover_database_enabled_c();
$this->redis_enabled = new failover_redis_enabled_c();
$this->minio_enabled = new failover_minio_enabled_c();
$this->max_status_age_seconds = new failover_max_status_age_seconds_c();
}
}