add clamav as option

Signed-off-by: szaimen <szaimen@e.mail.de>
This commit is contained in:
szaimen 2022-03-15 23:46:58 +01:00
parent 31f86c1570
commit 38726f039a
13 changed files with 155 additions and 7 deletions

View file

@ -49,6 +49,12 @@ class ContainerDefinitionFetcher
$containers = [];
foreach ($data['production'] as $entry) {
if ($entry['identifier'] === 'nextcloud-aio-clamav') {
if (!$this->configurationManager->isClamavEnabled()) {
continue;
}
}
$ports = new ContainerPorts();
foreach ($entry['ports'] as $port) {
if($port === '%APACHE_PORT%/tcp') {
@ -99,6 +105,16 @@ class ContainerDefinitionFetcher
);
}
$dependsOn = [];
foreach ($entry['dependsOn'] as $value) {
if ($value === 'nextcloud-aio-clamav') {
if (!$this->configurationManager->isClamavEnabled()) {
continue;
}
}
$dependsOn[] = $value;
}
$variables = new ContainerEnvironmentVariables();
foreach ($entry['environmentVariables'] as $value) {
$variables->AddVariable($value);
@ -114,7 +130,7 @@ class ContainerDefinitionFetcher
$internalPorts,
$volumes,
$variables,
$entry['dependsOn'],
$dependsOn,
$entry['secrets'],
$this->container->get(DockerActionManager::class)
);