mirror of
https://github.com/nextcloud/all-in-one.git
synced 2024-09-20 14:56:08 +08:00
Merge pull request #4912 from nextcloud/no-listen
Implement internal mode
This commit is contained in:
commit
d304c791ff
|
@ -180,7 +180,7 @@ It is set to '$APACHE_PORT'."
|
|||
fi
|
||||
fi
|
||||
if [ -n "$APACHE_IP_BINDING" ]; then
|
||||
if ! echo "$APACHE_IP_BINDING" | grep -q '^[0-9]\+\.[0-9]\+\.[0-9]\+\.[0-9]\+$\|^[0-9a-f:]\+$'; then
|
||||
if ! echo "$APACHE_IP_BINDING" | grep -q '^[0-9]\+\.[0-9]\+\.[0-9]\+\.[0-9]\+$\|^[0-9a-f:]\+$\|^@INTERNAL$'; then
|
||||
print_red "You provided an ip-address for the apache container's ip-binding but it was not a valid ip-address.
|
||||
It is set to '$APACHE_IP_BINDING'."
|
||||
exit 1
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
}
|
||||
],
|
||||
"aio_variables": [
|
||||
"apache_ip_binding=127.0.0.1",
|
||||
"apache_ip_binding=@INTERNAL",
|
||||
"apache_port=11000"
|
||||
],
|
||||
"nextcloud_exec_commands": [
|
||||
|
|
|
@ -221,7 +221,6 @@
|
|||
"DOCKER_SOCKET_PROXY_ENABLED=%DOCKER_SOCKET_PROXY_ENABLED%",
|
||||
"REMOVE_DISABLED_APPS=%REMOVE_DISABLED_APPS%",
|
||||
"APACHE_PORT=%APACHE_PORT%",
|
||||
"APACHE_IP_BINDING=%APACHE_IP_BINDING%",
|
||||
"ADDITIONAL_TRUSTED_PROXY=%CADDY_IP_ADDRESS%",
|
||||
"THIS_IS_AIO=true",
|
||||
"IMAGINARY_SECRET=%IMAGINARY_SECRET%"
|
||||
|
|
|
@ -295,8 +295,6 @@ class DockerActionManager
|
|||
$replacements[1] = $this->configurationManager->GetSelectedRestoreTime();
|
||||
} elseif ($out[1] === 'APACHE_PORT') {
|
||||
$replacements[1] = $this->configurationManager->GetApachePort();
|
||||
} elseif ($out[1] === 'APACHE_IP_BINDING') {
|
||||
$replacements[1] = $this->configurationManager->GetApacheIPBinding();
|
||||
} elseif ($out[1] === 'TALK_PORT') {
|
||||
$replacements[1] = $this->configurationManager->GetTalkPort();
|
||||
} elseif ($out[1] === 'NEXTCLOUD_MOUNT') {
|
||||
|
@ -478,6 +476,10 @@ class DockerActionManager
|
|||
$ipBinding = $value->ipBinding;
|
||||
if ($ipBinding === '%APACHE_IP_BINDING%') {
|
||||
$ipBinding = $this->configurationManager->GetApacheIPBinding();
|
||||
// Do not expose if AIO is in internal network mode
|
||||
if ($ipBinding === '@INTERNAL') {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
$portWithProtocol = $port . '/' . $protocol;
|
||||
$requestBody['HostConfig']['PortBindings'][$portWithProtocol] = [
|
||||
|
|
Loading…
Reference in a new issue