mirror of
https://github.com/tiennm99/coolify.git
synced 2026-07-03 11:17:26 +00:00
feat(server): add configurable SSH connection timeout per server
Add `connection_timeout` field to server settings, allowing per-server override of the global SSH connection timeout constant. - Migration adds `connection_timeout` integer column (default 10s) - `ServerSetting` model exposes and casts the new field - `SshMultiplexingHelper::getConnectionTimeout()` resolves per-server value with fallback to `constants.ssh.connection_timeout` - All SSH/SCP command builders use the new resolver instead of the global config directly - Livewire `Show` component binds `connectionTimeout` with validation (1–300 seconds) and syncs to/from the model - UI input added to server settings form with helper text - Feature tests cover default, persistence, resolver, and fallback
This commit is contained in:
@@ -49,6 +49,7 @@ use OpenApi\Attributes as OA;
|
||||
'updated_at' => ['type' => 'string'],
|
||||
'delete_unused_volumes' => ['type' => 'boolean', 'description' => 'The flag to indicate if the unused volumes should be deleted.'],
|
||||
'delete_unused_networks' => ['type' => 'boolean', 'description' => 'The flag to indicate if the unused networks should be deleted.'],
|
||||
'connection_timeout' => ['type' => 'integer', 'description' => 'SSH connection timeout in seconds.'],
|
||||
]
|
||||
)]
|
||||
class ServerSetting extends Model
|
||||
@@ -97,6 +98,7 @@ class ServerSetting extends Model
|
||||
'is_terminal_enabled',
|
||||
'deployment_queue_limit',
|
||||
'disable_application_image_retention',
|
||||
'connection_timeout',
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
@@ -108,6 +110,7 @@ class ServerSetting extends Model
|
||||
'is_usable' => 'boolean',
|
||||
'is_terminal_enabled' => 'boolean',
|
||||
'disable_application_image_retention' => 'boolean',
|
||||
'connection_timeout' => 'integer',
|
||||
];
|
||||
|
||||
protected static function booted()
|
||||
|
||||
Reference in New Issue
Block a user