feat(core): Enable magic env variables for compose based applications
This commit is contained in:
@@ -3014,7 +3014,7 @@ function newParser(Application|Service $resource, int $pull_request_id = 0, ?int
|
||||
$savedService->image = $image;
|
||||
$savedService->save();
|
||||
}
|
||||
|
||||
}
|
||||
$environment = collect(data_get($service, 'environment', []));
|
||||
$buildArgs = collect(data_get($service, 'build.args', []));
|
||||
$environment = $environment->merge($buildArgs);
|
||||
@@ -3059,7 +3059,7 @@ function newParser(Application|Service $resource, int $pull_request_id = 0, ?int
|
||||
$port = null;
|
||||
}
|
||||
if ($isApplication) {
|
||||
$fqdn = generateFqdn($server, "{$resource->name}-$uuid");
|
||||
$fqdn = generateFqdn($server, "$uuid");
|
||||
} elseif ($isService) {
|
||||
if ($fqdnFor) {
|
||||
$fqdn = generateFqdn($server, "$fqdnFor-$uuid");
|
||||
@@ -3129,11 +3129,7 @@ function newParser(Application|Service $resource, int $pull_request_id = 0, ?int
|
||||
if (str($fqdnFor)->contains('_')) {
|
||||
$fqdnFor = str($fqdnFor)->before('_');
|
||||
}
|
||||
if ($isApplication) {
|
||||
$fqdn = generateFqdn($server, "{$resource->name}-$uuid");
|
||||
} elseif ($isService) {
|
||||
$fqdn = generateFqdn($server, "$fqdnFor-$uuid");
|
||||
}
|
||||
$resource->environment_variables()->firstOrCreate([
|
||||
'key' => $key->value(),
|
||||
'resourceable_type' => get_class($resource),
|
||||
@@ -3148,11 +3144,7 @@ function newParser(Application|Service $resource, int $pull_request_id = 0, ?int
|
||||
if (str($fqdnFor)->contains('_')) {
|
||||
$fqdnFor = str($fqdnFor)->before('_');
|
||||
}
|
||||
if ($isApplication) {
|
||||
$fqdn = generateFqdn($server, "{$resource->name}-$uuid");
|
||||
} elseif ($isService) {
|
||||
$fqdn = generateFqdn($server, "$fqdnFor-$uuid");
|
||||
}
|
||||
$fqdn = str($fqdn)->replace('http://', '')->replace('https://', '');
|
||||
$resource->environment_variables()->firstOrCreate([
|
||||
'key' => $key->value(),
|
||||
@@ -3178,7 +3170,6 @@ function newParser(Application|Service $resource, int $pull_request_id = 0, ?int
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$serviceAppsLogDrainEnabledMap = collect([]);
|
||||
if ($resource instanceof Service) {
|
||||
|
Reference in New Issue
Block a user