From 28c7e439b1a371d5f4ff6f63866625e6b8fe67db Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Mon, 15 Jul 2024 10:55:04 +0200 Subject: [PATCH] fix: service domains and envs are properly updated --- bootstrap/helpers/services.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bootstrap/helpers/services.php b/bootstrap/helpers/services.php index 9140ca8c8..6390f26e8 100644 --- a/bootstrap/helpers/services.php +++ b/bootstrap/helpers/services.php @@ -106,7 +106,7 @@ function updateCompose(ServiceApplication|ServiceDatabase $resource) if ($resourceFqdns->count() === 1) { $resourceFqdns = $resourceFqdns->first(); $variableName = 'SERVICE_FQDN_'.str($resource->name)->upper()->replace('-', ''); - $generatedEnv = EnvironmentVariable::where('service_id', $resource->service_id)->where('key', $variableName)->first(); + $generatedEnv = EnvironmentVariable::where('service_id', $resource->service_id)->where('key', 'LIKE', "{$variableName}_%")->first(); $fqdn = Url::fromString($resourceFqdns); $port = $fqdn->getPort(); $path = $fqdn->getPath(); @@ -125,7 +125,7 @@ function updateCompose(ServiceApplication|ServiceDatabase $resource) } } $variableName = 'SERVICE_URL_'.str($resource->name)->upper()->replace('-', ''); - $generatedEnv = EnvironmentVariable::where('service_id', $resource->service_id)->where('key', $variableName)->first(); + $generatedEnv = EnvironmentVariable::where('service_id', $resource->service_id)->where('key', 'LIKE', "{$variableName}_%")->first(); $url = Url::fromString($fqdn); $port = $url->getPort(); $path = $url->getPath();