Skip to content

Commit d051815

Browse files
committed
fix: generated fqdn for SERVICE_FQDN_APP_3000 magic envs
1 parent 2d306d5 commit d051815

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

bootstrap/helpers/shared.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2985,7 +2985,11 @@ function newParser(Application|Service $resource, int $pull_request_id = 0, ?int
29852985
// Get magic environments where we need to preset the FQDN
29862986
if ($key->startsWith('SERVICE_FQDN_')) {
29872987
// SERVICE_FQDN_APP or SERVICE_FQDN_APP_3000
2988-
$fqdnFor = $key->after('SERVICE_FQDN_')->lower()->value();
2988+
if (substr_count(str($key)->value(), '_') === 3) {
2989+
$fqdnFor = $key->after('SERVICE_FQDN_')->beforeLast('_')->lower()->value();
2990+
} else {
2991+
$fqdnFor = $key->after('SERVICE_FQDN_')->lower()->value();
2992+
}
29892993
if ($isApplication) {
29902994
$fqdn = generateFqdn($server, "{$resource->name}-$uuid");
29912995
} elseif ($isService) {

0 commit comments

Comments
 (0)