From 18fe524cdbd578d0f9f8bb8b787771f8f80f380c Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Wed, 12 Mar 2025 16:34:42 +0100 Subject: [PATCH] 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. --- app/Actions/Database/StartDatabaseProxy.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Actions/Database/StartDatabaseProxy.php b/app/Actions/Database/StartDatabaseProxy.php index c16a5638a..8d7d1ce2e 100644 --- a/app/Actions/Database/StartDatabaseProxy.php +++ b/app/Actions/Database/StartDatabaseProxy.php @@ -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,