allow to adjust the upload limit

Signed-off-by: szaimen <szaimen@e.mail.de>
This commit is contained in:
szaimen 2022-08-17 18:34:02 +02:00
parent 7ba83089ec
commit e152185fe9
8 changed files with 25 additions and 1 deletions

View file

@ -143,7 +143,8 @@
"TZ=%TIMEZONE%",
"TALK_PORT=%TALK_PORT%",
"IMAGINARY_ENABLED=%IMAGINARY_ENABLED%",
"IMAGINARY_HOST=nextcloud-aio-imaginary"
"IMAGINARY_HOST=nextcloud-aio-imaginary",
"PHP_UPLOAD_LIMIT=%NEXTCLOUD_UPLOAD_LIMIT%"
],
"maxShutdownTime": 10,
"restartPolicy": "unless-stopped"

View file

@ -502,6 +502,13 @@ class ConfigurationManager
return $this->GetEnvironmentalVariableOrConfig($envVariableName, $configName, $defaultValue);
}
public function GetNextcloudUploadLimit() : string {
$envVariableName = 'NEXTCLOUD_UPLOAD_LIMIT';
$configName = 'nextcloud_upload_limit';
$defaultValue = '10G';
return $this->GetEnvironmentalVariableOrConfig($envVariableName, $configName, $defaultValue);
}
public function GetDockerSocketPath() : string {
$envVariableName = 'DOCKER_SOCKET_PATH';
$configName = 'docker_socket_path';

View file

@ -304,6 +304,8 @@ class DockerActionManager
} else {
$replacements[1] = '';
}
} elseif ($out[1] === 'NEXTCLOUD_UPLOAD_LIMIT') {
$replacements[1] = $this->configurationManager->GetNextcloudUploadLimit();
} else {
$replacements[1] = $this->configurationManager->GetSecret($out[1]);
}