fix(database): limit container name length for database proxy
Updated the container name generation logic in StartDatabaseProxy to ensure the resulting name does not exceed 32 characters. This change prevents potential issues with container name length restrictions, enhancing the robustness of the database proxy setup.
This commit is contained in:
@@ -32,7 +32,7 @@ class StartDatabaseProxy
|
||||
$network = $database->service->uuid;
|
||||
$server = data_get($database, 'service.destination.server');
|
||||
$proxyContainerName = "{$database->service->uuid}-proxy";
|
||||
$containerName = str($database->name)->slug().'-'.$database->s˝ervice->uuid;
|
||||
$containerName = substr(str($database->name)->slug().'-'.$database->service->uuid, 0, 32);
|
||||
}
|
||||
$internalPort = match ($databaseType) {
|
||||
'standalone-mariadb', 'standalone-mysql' => 3306,
|
||||
|
Reference in New Issue
Block a user