mirror of
https://github.com/nextcloud/all-in-one.git
synced 2026-02-04 04:56:52 +00:00
Merge pull request #7520 from nextcloud/enh/noid/refactor-apache-additional-network
only allow to set `APACHE_ADDITIONAL_NETWORK` via environmental variable and do not restore it on backup restore
This commit is contained in:
commit
3bde5259f2
2 changed files with 9 additions and 6 deletions
|
|
@ -263,11 +263,6 @@ class ConfigurationManager
|
|||
set { $this->set('collabora_seccomp_disabled', $value); }
|
||||
}
|
||||
|
||||
public string $apacheAdditionalNetwork {
|
||||
get => $this->getEnvironmentalVariableOrConfig('APACHE_ADDITIONAL_NETWORK', 'apache_additional_network', '');
|
||||
set { $this->set('apache_additional_network', $value); }
|
||||
}
|
||||
|
||||
public bool $disableBackupSection {
|
||||
get => $this->booleanize($this->getEnvironmentalVariableOrConfig('AIO_DISABLE_BACKUP_SECTION', 'disable_backup_section', ''));
|
||||
set { $this->set('disable_backup_section', $value); }
|
||||
|
|
@ -854,6 +849,14 @@ class ConfigurationManager
|
|||
return false;
|
||||
}
|
||||
|
||||
public function getApacheAdditionalNetwork() : string {
|
||||
$network = getenv('APACHE_ADDITIONAL_NETWORK');
|
||||
if (is_string($network)) {
|
||||
return trim($network);
|
||||
}
|
||||
return '';
|
||||
}
|
||||
|
||||
public function getNextcloudStartupApps() : string {
|
||||
$apps = getenv('NEXTCLOUD_STARTUP_APPS');
|
||||
if (is_string($apps)) {
|
||||
|
|
|
|||
|
|
@ -843,7 +843,7 @@ readonly class DockerActionManager {
|
|||
$this->ConnectContainerIdToNetwork($container->identifier, $container->internalPorts, alias: $alias);
|
||||
|
||||
if ($container->identifier === 'nextcloud-aio-apache' || $container->identifier === 'nextcloud-aio-domaincheck') {
|
||||
$apacheAdditionalNetwork = $this->configurationManager->apacheAdditionalNetwork;
|
||||
$apacheAdditionalNetwork = $this->configurationManager->getApacheAdditionalNetwork();
|
||||
if ($apacheAdditionalNetwork !== '') {
|
||||
$this->ConnectContainerIdToNetwork($container->identifier, $container->internalPorts, $apacheAdditionalNetwork, false, $alias);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue