mirror of
https://github.com/nextcloud/all-in-one.git
synced 2026-02-16 02:30:17 +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(),
|
'is_daily_backup_running' => $configurationManager->isDailyBackupRunning(),
|
||||||
'timezone' => $configurationManager->timezone,
|
'timezone' => $configurationManager->timezone,
|
||||||
'skip_domain_validation' => $configurationManager->shouldDomainValidationBeSkipped($skip_domain_validation),
|
'skip_domain_validation' => $configurationManager->shouldDomainValidationBeSkipped($skip_domain_validation),
|
||||||
'talk_port' => $configurationManager->GetTalkPort(),
|
'talk_port' => $configurationManager->talk_port,
|
||||||
'collabora_dictionaries' => $configurationManager->collabora_dictionaries,
|
'collabora_dictionaries' => $configurationManager->collabora_dictionaries,
|
||||||
'collabora_additional_options' => $configurationManager->collabora_additional_options,
|
'collabora_additional_options' => $configurationManager->collabora_additional_options,
|
||||||
'automatic_updates' => $configurationManager->areAutomaticUpdatesEnabled(),
|
'automatic_updates' => $configurationManager->areAutomaticUpdatesEnabled(),
|
||||||
|
|
|
||||||
|
|
@ -562,12 +562,10 @@ class ConfigurationManager
|
||||||
get => $this->GetEnvironmentalVariableOrConfig('APACHE_PORT', 'apache_port', '443');
|
get => $this->GetEnvironmentalVariableOrConfig('APACHE_PORT', 'apache_port', '443');
|
||||||
set { $this->set('apache_port', $value); }
|
set { $this->set('apache_port', $value); }
|
||||||
}
|
}
|
||||||
|
|
||||||
public function GetTalkPort() : string {
|
public string $talk_port {
|
||||||
$envVariableName = 'TALK_PORT';
|
get => $this->GetEnvironmentalVariableOrConfig('TALK_PORT', 'talk_port', '3478');
|
||||||
$configName = 'talk_port';
|
set { $this->set('talk_port', $value); }
|
||||||
$defaultValue = '3478';
|
|
||||||
return $this->GetEnvironmentalVariableOrConfig($envVariableName, $configName, $defaultValue);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -117,7 +117,7 @@ readonly class DockerActionManager {
|
||||||
if ($internalPort === '%APACHE_PORT%') {
|
if ($internalPort === '%APACHE_PORT%') {
|
||||||
$internalPort = $this->configurationManager->apache_port;
|
$internalPort = $this->configurationManager->apache_port;
|
||||||
} elseif ($internalPort === '%TALK_PORT%') {
|
} elseif ($internalPort === '%TALK_PORT%') {
|
||||||
$internalPort = $this->configurationManager->GetTalkPort();
|
$internalPort = $this->configurationManager->talk_port;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($internalPort !== "" && $internalPort !== 'host') {
|
if ($internalPort !== "" && $internalPort !== 'host') {
|
||||||
|
|
@ -267,7 +267,7 @@ readonly class DockerActionManager {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
} else if ($port === '%TALK_PORT%') {
|
} else if ($port === '%TALK_PORT%') {
|
||||||
$port = $this->configurationManager->GetTalkPort();
|
$port = $this->configurationManager->talk_port;
|
||||||
}
|
}
|
||||||
$portWithProtocol = $port . '/' . $protocol;
|
$portWithProtocol = $port . '/' . $protocol;
|
||||||
$exposedPorts[$portWithProtocol] = null;
|
$exposedPorts[$portWithProtocol] = null;
|
||||||
|
|
@ -289,7 +289,7 @@ readonly class DockerActionManager {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
} else if ($port === '%TALK_PORT%') {
|
} 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
|
// Skip publishing talk tcp port if it is set to 443
|
||||||
if ($port === '443' && $protocol === 'tcp') {
|
if ($port === '443' && $protocol === 'tcp') {
|
||||||
continue;
|
continue;
|
||||||
|
|
@ -567,7 +567,7 @@ readonly class DockerActionManager {
|
||||||
'SELECTED_RESTORE_TIME' => $this->configurationManager->selectedRestoreTime,
|
'SELECTED_RESTORE_TIME' => $this->configurationManager->selectedRestoreTime,
|
||||||
'APACHE_PORT' => $this->configurationManager->apache_port,
|
'APACHE_PORT' => $this->configurationManager->apache_port,
|
||||||
'APACHE_IP_BINDING' => $this->configurationManager->apache_ip_binding,
|
'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,
|
'TURN_DOMAIN' => $this->configurationManager->turn_domain,
|
||||||
'NEXTCLOUD_MOUNT' => $this->configurationManager->GetNextcloudMount(),
|
'NEXTCLOUD_MOUNT' => $this->configurationManager->GetNextcloudMount(),
|
||||||
'BACKUP_RESTORE_PASSWORD' => $this->configurationManager->borg_restore_password,
|
'BACKUP_RESTORE_PASSWORD' => $this->configurationManager->borg_restore_password,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue