mirror of
https://github.com/nextcloud/all-in-one.git
synced 2025-12-20 06:26:57 +00:00
allow to adjust the talk port
Signed-off-by: szaimen <szaimen@e.mail.de>
This commit is contained in:
parent
8b7aa71d15
commit
7ae718300f
13 changed files with 50 additions and 15 deletions
|
|
@ -71,6 +71,10 @@ class ContainerDefinitionFetcher
|
|||
foreach ($entry['ports'] as $port) {
|
||||
if($port === '%APACHE_PORT%/tcp') {
|
||||
$port = $this->configurationManager->GetApachePort() . '/tcp';
|
||||
} elseif($port === '%TALK_PORT%/tcp') {
|
||||
$port = $this->configurationManager->GetTalkPort() . '/tcp';
|
||||
} elseif($port === '%TALK_PORT%/udp') {
|
||||
$port = $this->configurationManager->GetTalkPort() . '/udp';
|
||||
}
|
||||
$ports->AddPort($port);
|
||||
}
|
||||
|
|
@ -79,6 +83,8 @@ class ContainerDefinitionFetcher
|
|||
foreach ($entry['internalPorts'] as $internalPort) {
|
||||
if($internalPort === '%APACHE_PORT%') {
|
||||
$internalPort = $this->configurationManager->GetApachePort();
|
||||
} elseif($internalPort === '%TALK_PORT%') {
|
||||
$internalPort = $this->configurationManager->GetTalkPort();
|
||||
}
|
||||
$internalPorts->AddInternalPort($internalPort);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -395,6 +395,13 @@ class ConfigurationManager
|
|||
return $this->GetEnvironmentalVariableOrConfig($envVariableName, $configName, $defaultValue);
|
||||
}
|
||||
|
||||
public function GetTalkPort() : string {
|
||||
$envVariableName = 'TALK_PORT';
|
||||
$configName = 'talk_port';
|
||||
$defaultValue = '3478';
|
||||
return $this->GetEnvironmentalVariableOrConfig($envVariableName, $configName, $defaultValue);
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws InvalidSettingConfigurationException
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -250,6 +250,8 @@ class DockerActionManager
|
|||
$replacements[1] = $this->configurationManager->GetSelectedRestoreTime();
|
||||
} elseif ($out[1] === 'APACHE_PORT') {
|
||||
$replacements[1] = $this->configurationManager->GetApachePort();
|
||||
} elseif ($out[1] === 'TALK_PORT') {
|
||||
$replacements[1] = $this->configurationManager->GetTalkPort();
|
||||
} elseif ($out[1] === 'NEXTCLOUD_MOUNT') {
|
||||
$replacements[1] = $this->configurationManager->GetNextcloudMount();
|
||||
} elseif ($out[1] === 'BACKUP_RESTORE_PASSWORD') {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue