mirror of
https://github.com/nextcloud/all-in-one.git
synced 2026-02-15 02:00:15 +00:00
Make nextcloud_mount an attribute
Signed-off-by: Pablo Zmdl <pablo@nextcloud.com>
This commit is contained in:
parent
bb865b7dee
commit
44d5b7cd5e
4 changed files with 9 additions and 11 deletions
|
|
@ -128,7 +128,7 @@ $app->get('/containers', function (Request $request, Response $response, array $
|
||||||
'is_fulltextsearch_enabled' => $configurationManager->isFulltextsearchEnabled,
|
'is_fulltextsearch_enabled' => $configurationManager->isFulltextsearchEnabled,
|
||||||
'additional_backup_directories' => $configurationManager->GetAdditionalBackupDirectoriesString(),
|
'additional_backup_directories' => $configurationManager->GetAdditionalBackupDirectoriesString(),
|
||||||
'nextcloud_datadir' => $configurationManager->GetNextcloudDatadirMount(),
|
'nextcloud_datadir' => $configurationManager->GetNextcloudDatadirMount(),
|
||||||
'nextcloud_mount' => $configurationManager->GetNextcloudMount(),
|
'nextcloud_mount' => $configurationManager->nextcloud_mount,
|
||||||
'nextcloud_upload_limit' => $configurationManager->nextcloud_upload_limit,
|
'nextcloud_upload_limit' => $configurationManager->nextcloud_upload_limit,
|
||||||
'nextcloud_max_time' => $configurationManager->GetNextcloudMaxTime(),
|
'nextcloud_max_time' => $configurationManager->GetNextcloudMaxTime(),
|
||||||
'nextcloud_memory_limit' => $configurationManager->GetNextcloudMemoryLimit(),
|
'nextcloud_memory_limit' => $configurationManager->GetNextcloudMemoryLimit(),
|
||||||
|
|
|
||||||
|
|
@ -119,7 +119,7 @@ readonly class ContainerDefinitionFetcher {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if($value['source'] === '%NEXTCLOUD_MOUNT%') {
|
if($value['source'] === '%NEXTCLOUD_MOUNT%') {
|
||||||
$value['source'] = $this->configurationManager->GetNextcloudMount();
|
$value['source'] = $this->configurationManager->nextcloud_mount;
|
||||||
if($value['source'] === '') {
|
if($value['source'] === '') {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
@ -140,7 +140,7 @@ readonly class ContainerDefinitionFetcher {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($value['destination'] === '%NEXTCLOUD_MOUNT%') {
|
if ($value['destination'] === '%NEXTCLOUD_MOUNT%') {
|
||||||
$value['destination'] = $this->configurationManager->GetNextcloudMount();
|
$value['destination'] = $this->configurationManager->nextcloud_mount;
|
||||||
if($value['destination'] === '') {
|
if($value['destination'] === '') {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -620,11 +620,9 @@ class ConfigurationManager
|
||||||
return trim((string)file_get_contents(DataConst::GetBackupPublicKey()));
|
return trim((string)file_get_contents(DataConst::GetBackupPublicKey()));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function GetNextcloudMount() : string {
|
public string $nextcloud_mount {
|
||||||
$envVariableName = 'NEXTCLOUD_MOUNT';
|
get => $this->GetEnvironmentalVariableOrConfig('NEXTCLOUD_MOUNT', 'nextcloud_mount', '');
|
||||||
$configName = 'nextcloud_mount';
|
set { $this->set('nextcloud_mount', $value); }
|
||||||
$defaultValue = '';
|
|
||||||
return $this->GetEnvironmentalVariableOrConfig($envVariableName, $configName, $defaultValue);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function GetNextcloudDatadirMount() : string {
|
public function GetNextcloudDatadirMount() : string {
|
||||||
|
|
|
||||||
|
|
@ -205,7 +205,7 @@ readonly class DockerActionManager {
|
||||||
foreach ($container->volumes->GetVolumes() as $volume) {
|
foreach ($container->volumes->GetVolumes() as $volume) {
|
||||||
// // NEXTCLOUD_MOUNT gets added via bind-mount later on
|
// // NEXTCLOUD_MOUNT gets added via bind-mount later on
|
||||||
// if ($container->identifier === 'nextcloud-aio-nextcloud') {
|
// if ($container->identifier === 'nextcloud-aio-nextcloud') {
|
||||||
// if ($volume->name === $this->configurationManager->GetNextcloudMount()) {
|
// if ($volume->name === $this->configurationManager->nextcloud_mount) {
|
||||||
// continue;
|
// continue;
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
|
|
@ -408,7 +408,7 @@ readonly class DockerActionManager {
|
||||||
// // Special things for the nextcloud container which should not be exposed in the containers.json
|
// // Special things for the nextcloud container which should not be exposed in the containers.json
|
||||||
// } elseif ($container->identifier === 'nextcloud-aio-nextcloud') {
|
// } elseif ($container->identifier === 'nextcloud-aio-nextcloud') {
|
||||||
// foreach ($container->volumes->GetVolumes() as $volume) {
|
// foreach ($container->volumes->GetVolumes() as $volume) {
|
||||||
// if ($volume->name !== $this->configurationManager->GetNextcloudMount()) {
|
// if ($volume->name !== $this->configurationManager->nextcloud_mount) {
|
||||||
// continue;
|
// continue;
|
||||||
// }
|
// }
|
||||||
// $mounts[] = ["Type" => "bind", "Source" => $volume->name, "Target" => $volume->mountPoint, "ReadOnly" => !$volume->isWritable, "BindOptions" => [ "Propagation" => "rshared"]];
|
// $mounts[] = ["Type" => "bind", "Source" => $volume->name, "Target" => $volume->mountPoint, "ReadOnly" => !$volume->isWritable, "BindOptions" => [ "Propagation" => "rshared"]];
|
||||||
|
|
@ -569,7 +569,7 @@ readonly class DockerActionManager {
|
||||||
'APACHE_IP_BINDING' => $this->configurationManager->apache_ip_binding,
|
'APACHE_IP_BINDING' => $this->configurationManager->apache_ip_binding,
|
||||||
'TALK_PORT' => $this->configurationManager->talk_port,
|
'TALK_PORT' => $this->configurationManager->talk_port,
|
||||||
'TURN_DOMAIN' => $this->configurationManager->turn_domain,
|
'TURN_DOMAIN' => $this->configurationManager->turn_domain,
|
||||||
'NEXTCLOUD_MOUNT' => $this->configurationManager->GetNextcloudMount(),
|
'NEXTCLOUD_MOUNT' => $this->configurationManager->nextcloud_mount,
|
||||||
'BACKUP_RESTORE_PASSWORD' => $this->configurationManager->borg_restore_password,
|
'BACKUP_RESTORE_PASSWORD' => $this->configurationManager->borg_restore_password,
|
||||||
'CLAMAV_ENABLED' => $this->configurationManager->isClamavEnabled ? 'yes' : '',
|
'CLAMAV_ENABLED' => $this->configurationManager->isClamavEnabled ? 'yes' : '',
|
||||||
'TALK_RECORDING_ENABLED' => $this->configurationManager->isTalkRecordingEnabled ? 'yes' : '',
|
'TALK_RECORDING_ENABLED' => $this->configurationManager->isTalkRecordingEnabled ? 'yes' : '',
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue