mirror of
https://github.com/nextcloud/all-in-one.git
synced 2025-12-24 00:16:50 +00:00
Let the Nextcloud-Container trust custom CAs (e.g. for using LDAPS) 2
Signed-off-by: Lorenzo Marroccoli <lollo0296@gmail.com> Signed-off-by: szaimen <szaimen@e.mail.de> Co-Authored-By: Simon L. <szaimen@e.mail.de>
This commit is contained in:
parent
bfcbc41141
commit
935d4aab11
10 changed files with 48 additions and 1 deletions
|
|
@ -112,6 +112,11 @@
|
|||
"name": "%NEXTCLOUD_MOUNT%",
|
||||
"location": "%NEXTCLOUD_MOUNT%",
|
||||
"writeable": true
|
||||
},
|
||||
{
|
||||
"name": "%TRUSTED_CACERTS_DIR%",
|
||||
"location": "/usr/local/share/ca-certificates",
|
||||
"writeable": false
|
||||
}
|
||||
],
|
||||
"environmentVariables": [
|
||||
|
|
@ -148,7 +153,8 @@
|
|||
"PHP_UPLOAD_LIMIT=%NEXTCLOUD_UPLOAD_LIMIT%",
|
||||
"FULLTEXTSEARCH_ENABLED=%FULLTEXTSEARCH_ENABLED%",
|
||||
"FULLTEXTSEARCH_HOST=nextcloud-aio-fulltextsearch",
|
||||
"PHP_MAX_TIME=%NEXTCLOUD_MAX_TIME%"
|
||||
"PHP_MAX_TIME=%NEXTCLOUD_MAX_TIME%",
|
||||
"TRUSTED_CACERTS_DIR=%TRUSTED_CACERTS_DIR%"
|
||||
],
|
||||
"maxShutdownTime": 10,
|
||||
"restartPolicy": "unless-stopped"
|
||||
|
|
|
|||
|
|
@ -120,6 +120,11 @@ class ContainerDefinitionFetcher
|
|||
if($value['name'] === '') {
|
||||
continue;
|
||||
}
|
||||
} elseif ($value['name'] === '%TRUSTED_CACERTS_DIR%') {
|
||||
$value['name'] = $this->configurationManager->GetTrustedCacertsDir();
|
||||
if($value['name'] === '') {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if ($value['location'] === '%NEXTCLOUD_MOUNT%') {
|
||||
$value['location'] = $this->configurationManager->GetNextcloudMount();
|
||||
|
|
|
|||
|
|
@ -538,6 +538,13 @@ class ConfigurationManager
|
|||
return $this->GetEnvironmentalVariableOrConfig($envVariableName, $configName, $defaultValue);
|
||||
}
|
||||
|
||||
public function GetTrustedCacertsDir() : string {
|
||||
$envVariableName = 'TRUSTED_CACERTS_DIR';
|
||||
$configName = 'trusted_cacerts_dir';
|
||||
$defaultValue = '';
|
||||
return $this->GetEnvironmentalVariableOrConfig($envVariableName, $configName, $defaultValue);
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws InvalidSettingConfigurationException
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -314,6 +314,8 @@ class DockerActionManager
|
|||
$replacements[1] = $this->configurationManager->GetNextcloudUploadLimit();
|
||||
} elseif ($out[1] === 'NEXTCLOUD_MAX_TIME') {
|
||||
$replacements[1] = $this->configurationManager->GetNextcloudMaxTime();
|
||||
} elseif ($out[1] === 'TRUSTED_CACERTS_DIR') {
|
||||
$replacements[1] = $this->configurationManager->GetTrustedCacertsDir();
|
||||
} elseif ($out[1] === 'ADDITIONAL_DIRECTORIES_BACKUP') {
|
||||
if ($this->configurationManager->GetAdditionalBackupDirectoriesString() !== '') {
|
||||
$replacements[1] = 'yes';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue