allow to set aio_variables from containers.json

Signed-off-by: Simon L <szaimen@e.mail.de>
This commit is contained in:
Simon L 2023-09-29 21:44:12 +02:00
parent 49aca0d955
commit 395380ea2b
5 changed files with 56 additions and 1 deletions

View file

@ -248,6 +248,15 @@ class DockerActionManager
$this->configurationManager->GetAndGenerateSecret($secret);
}
$aioVariables = $container->GetAioVariables()->GetVariables();
foreach($aioVariables as $variable) {
$config = $this->configurationManager->GetConfig();
$variableArray = explode('=', $variable);
$config[$variableArray[0]] = $variableArray[1];
$this->configurationManager->WriteConfig($config);
sleep(1);
}
$envs = $container->GetEnvironmentVariables()->GetVariables();
// Special thing for the nextcloud container
if ($container->GetIdentifier() === 'nextcloud-aio-nextcloud') {