Skip to content
This repository has been archived by the owner on Nov 19, 2024. It is now read-only.

Commit

Permalink
set mantle service on php command if network service shares network
Browse files Browse the repository at this point in the history
  • Loading branch information
svensp committed Aug 27, 2019
1 parent 3e57e63 commit ead2906
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
4 changes: 0 additions & 4 deletions app/Blueprint/Infrastructure/Service/Service.php
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,6 @@ public function setKeepStdin(bool $keepStdin) {
*/
public function getLinks(): array {
if($this->isMantled()) {
echo $this->getName().' has mantled links!'.PHP_EOL;
return [];
}

Expand Down Expand Up @@ -635,9 +634,6 @@ public function setAlwaysPulled( $alwaysPulled ) {
*/
public function getCopyVolumesFrom(): array
{
if($this->mantleService instanceof Service) {
}

return $this->copyVolumesFrom;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,10 @@ public function mainServiceBuilt( MainServiceBuiltEvent $event ) {
];

$isSidekick = !$command->isService();
if( $isSidekick && $command->isNetworkShared() )
$service->setNetworkMode(new ShareNetworkMode($mainService));
if( $isSidekick && $command->isNetworkShared() ) {
$service->setMantleService($mainService);
$service->setNetworkMode(new ShareNetworkMode($mainService));
}

if ( array_key_exists( $command->getRestart(), $restart ) )
$service->setRestart( $restart[$command->getRestart()] );
Expand Down

0 comments on commit ead2906

Please sign in to comment.