mirror of
https://github.com/nextcloud/all-in-one.git
synced 2026-02-04 13:06:53 +00:00
Make talk_port an attribute
Signed-off-by: Pablo Zmdl <pablo@nextcloud.com>
This commit is contained in:
parent
3f37b77255
commit
cf60cbe9bc
3 changed files with 9 additions and 11 deletions
|
|
@ -119,7 +119,7 @@ $app->get('/containers', function (Request $request, Response $response, array $
|
|||
'is_daily_backup_running' => $configurationManager->isDailyBackupRunning(),
|
||||
'timezone' => $configurationManager->timezone,
|
||||
'skip_domain_validation' => $configurationManager->shouldDomainValidationBeSkipped($skip_domain_validation),
|
||||
'talk_port' => $configurationManager->GetTalkPort(),
|
||||
'talk_port' => $configurationManager->talk_port,
|
||||
'collabora_dictionaries' => $configurationManager->collabora_dictionaries,
|
||||
'collabora_additional_options' => $configurationManager->collabora_additional_options,
|
||||
'automatic_updates' => $configurationManager->areAutomaticUpdatesEnabled(),
|
||||
|
|
|
|||
|
|
@ -562,12 +562,10 @@ class ConfigurationManager
|
|||
get => $this->GetEnvironmentalVariableOrConfig('APACHE_PORT', 'apache_port', '443');
|
||||
set { $this->set('apache_port', $value); }
|
||||
}
|
||||
|
||||
public function GetTalkPort() : string {
|
||||
$envVariableName = 'TALK_PORT';
|
||||
$configName = 'talk_port';
|
||||
$defaultValue = '3478';
|
||||
return $this->GetEnvironmentalVariableOrConfig($envVariableName, $configName, $defaultValue);
|
||||
|
||||
public string $talk_port {
|
||||
get => $this->GetEnvironmentalVariableOrConfig('TALK_PORT', 'talk_port', '3478');
|
||||
set { $this->set('talk_port', $value); }
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -117,7 +117,7 @@ readonly class DockerActionManager {
|
|||
if ($internalPort === '%APACHE_PORT%') {
|
||||
$internalPort = $this->configurationManager->apache_port;
|
||||
} elseif ($internalPort === '%TALK_PORT%') {
|
||||
$internalPort = $this->configurationManager->GetTalkPort();
|
||||
$internalPort = $this->configurationManager->talk_port;
|
||||
}
|
||||
|
||||
if ($internalPort !== "" && $internalPort !== 'host') {
|
||||
|
|
@ -267,7 +267,7 @@ readonly class DockerActionManager {
|
|||
continue;
|
||||
}
|
||||
} else if ($port === '%TALK_PORT%') {
|
||||
$port = $this->configurationManager->GetTalkPort();
|
||||
$port = $this->configurationManager->talk_port;
|
||||
}
|
||||
$portWithProtocol = $port . '/' . $protocol;
|
||||
$exposedPorts[$portWithProtocol] = null;
|
||||
|
|
@ -289,7 +289,7 @@ readonly class DockerActionManager {
|
|||
continue;
|
||||
}
|
||||
} else if ($port === '%TALK_PORT%') {
|
||||
$port = $this->configurationManager->GetTalkPort();
|
||||
$port = $this->configurationManager->talk_port;
|
||||
// Skip publishing talk tcp port if it is set to 443
|
||||
if ($port === '443' && $protocol === 'tcp') {
|
||||
continue;
|
||||
|
|
@ -567,7 +567,7 @@ readonly class DockerActionManager {
|
|||
'SELECTED_RESTORE_TIME' => $this->configurationManager->selectedRestoreTime,
|
||||
'APACHE_PORT' => $this->configurationManager->apache_port,
|
||||
'APACHE_IP_BINDING' => $this->configurationManager->apache_ip_binding,
|
||||
'TALK_PORT' => $this->configurationManager->GetTalkPort(),
|
||||
'TALK_PORT' => $this->configurationManager->talk_port,
|
||||
'TURN_DOMAIN' => $this->configurationManager->turn_domain,
|
||||
'NEXTCLOUD_MOUNT' => $this->configurationManager->GetNextcloudMount(),
|
||||
'BACKUP_RESTORE_PASSWORD' => $this->configurationManager->borg_restore_password,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue