Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Ph3nol committed May 29, 2018
1 parent 85efecc commit 82458a4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ public function getPackageManager(): string
*/
public function preExecute(): void
{
parent::preExecute();

$service = $this->getService();
if (true === $service->getOptions()['with_management']) {
$service
Expand Down
11 changes: 9 additions & 2 deletions src/Application/DockerContainer/NginxDockerContainer.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,16 @@ public function postExecute(): void
}

// Main Network Aliases.
$this->addNetworkAlias(self::DOCKER_MAIN_NETWORK, $service->getHost());
$isServiceNetworkAliasable = function (ServiceInterface $service) {
return null !== $service->getHost();
};
if (true === $isServiceNetworkAliasable($service)) {
$this->addNetworkAlias(self::DOCKER_MAIN_NETWORK, $service->getHost());
}
foreach ($this->vhostsServicesByHost as $vhostService) {
$this->addNetworkAlias(self::DOCKER_MAIN_NETWORK, $vhostService->getHost());
if ($isServiceNetworkAliasable($vhostService)) {
$this->addNetworkAlias(self::DOCKER_MAIN_NETWORK, $vhostService->getHost());
}
}
}

Expand Down

0 comments on commit 82458a4

Please sign in to comment.