mirror of
https://github.com/cupcakearmy/coolify.git
synced 2024-10-22 08:04:19 +02:00
fix: env variable in value parsed
This commit is contained in:
parent
ba90a52344
commit
bfeaae9caa
@ -43,6 +43,7 @@ public function saveEditedCompose()
|
||||
{
|
||||
$this->dispatch('info', 'Saving new docker compose...');
|
||||
$this->dispatch('saveCompose', $this->service->docker_compose_raw);
|
||||
$this->dispatch('refreshStorages');
|
||||
}
|
||||
|
||||
public function instantSave()
|
||||
|
@ -24,6 +24,7 @@ class All extends Component
|
||||
|
||||
protected $listeners = [
|
||||
'saveKey' => 'submit',
|
||||
'refreshEnvs',
|
||||
'environmentVariableDeleted' => 'refreshEnvs',
|
||||
];
|
||||
|
||||
@ -61,7 +62,7 @@ public function sortEnvironmentVariables()
|
||||
$sortBy = data_get($this->resource, 'settings.is_env_sorting_enabled') ? 'key' : 'order';
|
||||
|
||||
$sortFunction = function ($variables) use ($sortBy) {
|
||||
if (!$variables) {
|
||||
if (! $variables) {
|
||||
return $variables;
|
||||
}
|
||||
if ($sortBy === 'key') {
|
||||
|
@ -136,4 +136,4 @@ public function delete()
|
||||
return handleError($e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -3331,7 +3331,10 @@ function newParser(Application|Service $resource, int $pull_request_id = 0, ?int
|
||||
foreach ($normalEnvironments as $key => $value) {
|
||||
$key = str($key);
|
||||
$value = str($value);
|
||||
if ($value->startsWith('$')) {
|
||||
if ($value->startsWith('$') || $value->contains('${')) {
|
||||
if ($value->contains('${')) {
|
||||
$value = $value->after('${')->before('}');
|
||||
}
|
||||
$value = str(replaceVariables(str($value)));
|
||||
if ($value->contains(':-')) {
|
||||
$key = $value->before(':');
|
||||
|
Loading…
Reference in New Issue
Block a user