mirror of
https://github.com/cupcakearmy/coolify.git
synced 2024-10-22 16:14:22 +02:00
fix: service env variables
This commit is contained in:
parent
1d419c6ab8
commit
d6fb54f3c3
@ -1839,16 +1839,23 @@ function parseDockerComposeFile(Service|Application $resource, bool $isNew = fal
|
|||||||
// Get variables from the service
|
// Get variables from the service
|
||||||
foreach ($serviceVariables as $variableName => $variable) {
|
foreach ($serviceVariables as $variableName => $variable) {
|
||||||
if (is_numeric($variableName)) {
|
if (is_numeric($variableName)) {
|
||||||
$variable = str($variable);
|
if (is_array($variable)) {
|
||||||
if ($variable->contains('=')) {
|
// - SESSION_SECRET: 123
|
||||||
// - SESSION_SECRET=123
|
// - SESSION_SECRET:
|
||||||
// - SESSION_SECRET=
|
$key = str(collect($variable)->keys()->first());
|
||||||
$key = $variable->before('=');
|
$value = str(collect($variable)->values()->first());
|
||||||
$value = $variable->after('=');
|
|
||||||
} else {
|
} else {
|
||||||
// - SESSION_SECRET
|
$variable = str($variable);
|
||||||
$key = $variable;
|
if ($variable->contains('=')) {
|
||||||
$value = null;
|
// - SESSION_SECRET=123
|
||||||
|
// - SESSION_SECRET=
|
||||||
|
$key = $variable->before('=');
|
||||||
|
$value = $variable->after('=');
|
||||||
|
} else {
|
||||||
|
// - SESSION_SECRET
|
||||||
|
$key = $variable;
|
||||||
|
$value = null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// SESSION_SECRET: 123
|
// SESSION_SECRET: 123
|
||||||
|
Loading…
Reference in New Issue
Block a user