Skip to content

Commit

Permalink
Change: update solr port on creating new env.
Browse files Browse the repository at this point in the history
  • Loading branch information
satrun77 committed Nov 24, 2016
1 parent 7e19997 commit 3682bff
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/MooCommand/Command/Workspace/Create.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ protected function updateWebEnvFile($sitePath)
{
// Highest port plus 1 && site name
$port = max($this->getUsedPorts()) + 1;
$solrPort = max($this->getUsedPorts('SOLR_PORT')) + 1;
$name = $this->argument('name');

// Open file for reading & replace host & port
Expand All @@ -112,6 +113,7 @@ protected function updateWebEnvFile($sitePath)
$contents = strtr($contents, [
'site1' => $name,
'1000' => $port,
'8983' => $solrPort,
]);
$envFile = null;

Expand Down

0 comments on commit 3682bff

Please sign in to comment.