mirror of
https://github.com/coollabsio/coolify.git
synced 2026-11-04 10:42:23 +00:00
Reapply "Merge branch 'next' into main"
This reverts commit 7bbd91175f.
This commit is contained in:
1 parent
7bbd91175f
commit
ca5fcce39b
139 files changed
+5343
-865
No files matched your search
@@ -302,6 +302,23 @@ class EnvironmentVariable extends BaseModel
|
||||
return $real_value;
|
||||
}
|
||||
|
||||
public function resolveReferencedValue(): ?string
|
||||
{
|
||||
$value = $this->value;
|
||||
|
||||
if ($this->is_literal || blank($value) || ! str($value)->startsWith('$')) {
|
||||
return $value;
|
||||
}
|
||||
|
||||
$referencedKey = str($value)->after('$')->trim('{}')->value();
|
||||
|
||||
return static::where('resourceable_type', $this->resourceable_type)
|
||||
->where('resourceable_id', $this->resourceable_id)
|
||||
->where('is_preview', (bool) $this->is_preview)
|
||||
->where('key', $referencedKey)
|
||||
->first()?->value ?? $value;
|
||||
}
|
||||
|
||||
private function get_real_environment_variables(?string $environment_variable = null, $resource = null)
|
||||
{
|
||||
return $this->get_real_environment_variables_internal($environment_variable, $resource);
|
||||
|
||||
Reference in new issue
Block a user