mirror of
https://github.com/nextcloud/all-in-one.git
synced 2025-09-06 06:35:37 +08:00
Apply suggestions from code review
Co-authored-by: Simon L. <szaimen@e.mail.de> Signed-off-by: Apoorv Parle <19315187+apparle@users.noreply.github.com>
This commit is contained in:
parent
4ad749a265
commit
75c2407afa
2 changed files with 6 additions and 6 deletions
|
@ -850,7 +850,7 @@ readonly class DockerActionManager {
|
|||
return;
|
||||
}
|
||||
|
||||
if($createNetwork) {
|
||||
if ($createNetwork) {
|
||||
$url = $this->BuildApiUrl('networks/create');
|
||||
try {
|
||||
$this->guzzleClient->request(
|
||||
|
@ -876,9 +876,9 @@ readonly class DockerActionManager {
|
|||
$url = $this->BuildApiUrl(
|
||||
sprintf('networks/%s/connect', $network)
|
||||
);
|
||||
$json_payload = [ 'Container' => $id ];
|
||||
$jsonPayload = [ 'Container' => $id ];
|
||||
if ($alias !== '' ) {
|
||||
$json_payload['EndpointConfig'] = [ 'Aliases' => [ $alias ] ];
|
||||
$jsonPayload['EndpointConfig'] = ['Aliases' => [ $alias ]];
|
||||
}
|
||||
|
||||
try {
|
||||
|
@ -886,7 +886,7 @@ readonly class DockerActionManager {
|
|||
'POST',
|
||||
$url,
|
||||
[
|
||||
'json' => $json_payload
|
||||
'json' => $jsonPayload
|
||||
]
|
||||
);
|
||||
} catch (RequestException $e) {
|
||||
|
@ -921,7 +921,7 @@ readonly class DockerActionManager {
|
|||
if ($container->GetIdentifier() === 'nextcloud-aio-apache' || $container->GetIdentifier() === 'nextcloud-aio-domaincheck') {
|
||||
$apacheAdditionalNetwork = $this->configurationManager->GetApacheAdditionalNetwork();
|
||||
if ($apacheAdditionalNetwork !== '') {
|
||||
$this->ConnectContainerIdToNetwork($container->GetIdentifier(), $container->GetInternalPort(), $apacheAdditionalNetwork, false, alias: $alias);
|
||||
$this->ConnectContainerIdToNetwork($container->GetIdentifier(), $container->GetInternalPort(), $apacheAdditionalNetwork, false, $alias);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -46,7 +46,7 @@ All examples below will use port `11000` as `APACHE_PORT`. This port will be exp
|
|||
|
||||
The reverse-proxy container needs to be connected to the nextcloud containers. This can be achieved one of these 3 ways:
|
||||
1. Utilize host networking instead of docker bridge networking: Specify `--network host` option (or `network_mode: host` for docker-compose) as setting for the reverse proxy container to connect it to the host network. If you are using a firewall on the server, you need to open ports 80 and 443 for the reverse proxy manually. With this setup, the default sample configurations with reverse-proxy pointing to `localhost:$APACHE_PORT` should work directly.
|
||||
1. Connect nextcloud's external-facing containers to the reverse-proxy's docker network by specifying env variable APACHE_ADDITIONAL_NETWORK. With this setup, the reverse proxy can utilize Docker bridge network's DNS name resolution to access nextcloud at `http://nextcloud-aio-apache:$APACHE_PORT`. Note, the specified network must already exist before Nextcloud AIO is started.
|
||||
1. Connect nextcloud's external-facing containers to the reverse-proxy's docker network by specifying env variable APACHE_ADDITIONAL_NETWORK. With this setup, the reverse proxy can utilize Docker bridge network's DNS name resolution to access nextcloud at `http://nextcloud-aio-apache:$APACHE_PORT`. ⚠️⚠️⚠️ Note, the specified network must already exist before Nextcloud AIO is started. Otherwise it will fail to start the container because the network is not existing.
|
||||
1. Connect the reverse-proxy container to the `nextcloud-aio` network by specifying it as a secondary (external) network for the reverse proxy container. With this setup also, the reverse proxy can utilize Docker bridge network's DNS name resolution to access nextcloud at `http://nextcloud-aio-apache:$APACHE_PORT` .
|
||||
|
||||
</details>
|
||||
|
|
Loading…
Add table
Reference in a new issue