From 620f70c7ff5d424f242948b16de9a5645a6eb08c Mon Sep 17 00:00:00 2001 From: Andras Bacsai <5845193+andrasbacsai@users.noreply.github.com> Date: Mon, 30 Jun 2025 09:26:28 +0200 Subject: [PATCH] fix(database): proxy ssl port if ssl is enabled --- app/Actions/Database/StartDatabaseProxy.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/Actions/Database/StartDatabaseProxy.php b/app/Actions/Database/StartDatabaseProxy.php index 744bbaa50..21fd6eb97 100644 --- a/app/Actions/Database/StartDatabaseProxy.php +++ b/app/Actions/Database/StartDatabaseProxy.php @@ -27,6 +27,8 @@ class StartDatabaseProxy $server = data_get($database, 'destination.server'); $containerName = data_get($database, 'uuid'); $proxyContainerName = "{$database->uuid}-proxy"; + $isSSLEnabled = $database->enable_ssl ?? false; + if ($database->getMorphClass() === \App\Models\ServiceDatabase::class) { $databaseType = $database->databaseType(); $network = $database->service->uuid; @@ -42,6 +44,12 @@ class StartDatabaseProxy 'standalone-mongodb' => 27017, default => throw new \Exception("Unsupported database type: $databaseType"), }; + if ($isSSLEnabled) { + $internalPort = match ($databaseType) { + 'standalone-redis', 'standalone-keydb', 'standalone-dragonfly' => 6380, + default => throw new \Exception("Unsupported database type: $databaseType"), + }; + } $configuration_dir = database_proxy_dir($database->uuid); if (isDev()) {