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:
Andras Bacsai
2025-03-12 16:34:42 +01:00
parent d894c3d903
commit 18fe524cdb

View File

@@ -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,