-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15 from Ph3nol/es-head
Mobz Elasticsearch Head tool added
- Loading branch information
Showing
7 changed files
with
78 additions
and
20 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,6 @@ | |
|
||
/** | ||
* @author Cédric Dugat <[email protected]> | ||
* @see https://hub.docker.com/r/yannart/cerebro | ||
*/ | ||
class CerebroDockerContainer extends DockerContainer | ||
{ | ||
|
@@ -56,7 +55,7 @@ public function init(): void | |
->setEntryPoint(['/usr/share/cerebro/bin/cerebro']); | ||
|
||
// Ports. | ||
$port = $this->addEnvPort('CEREBRO', ['from' => '8021', 'to' => '9000']); | ||
$port = $this->addEnvPort('ELASTIC_SEARCH_CEREBRO', ['from' => '8021', 'to' => '9000']); | ||
|
||
// UI. | ||
$service->getParentService()->addUIAccess([ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
src/Application/DockerContainer/ElasticsearchHeadDockerContainer.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<?php | ||
|
||
namespace Ph3\DockerArch\Application\DockerContainer; | ||
|
||
use Ph3\DockerArch\Domain\DockerContainer\Model\DockerContainer; | ||
use Ph3\DockerArch\Domain\DockerContainer\Model\DockerContainerInterface; | ||
use Ph3\DockerArch\Domain\TemplatedFile\Model\TemplatedFile; | ||
|
||
/** | ||
* @author Cédric Dugat <[email protected]> | ||
*/ | ||
class ElasticsearchHeadDockerContainer extends DockerContainer | ||
{ | ||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function init(): void | ||
{ | ||
$this->setPackageManager(DockerContainerInterface::PACKAGE_MANAGER_TYPE_APK); | ||
|
||
parent::init(); | ||
|
||
$service = $this->getService(); | ||
|
||
$this->setFrom('mobz/elasticsearch-head:5-alpine'); | ||
|
||
// Ports. | ||
$port = $this->addEnvPort('ELASTIC_SEARCH_HEAD', ['from' => '8022', 'to' => '9100']); | ||
|
||
// UI. | ||
$elasticSearchPorts = $service->getParentService()->getDockerContainer()->getPorts(); | ||
$elasticSearchPort = reset($elasticSearchPorts)['from']; | ||
$service->getParentService()->addUIAccess([ | ||
'url' => 'localhost', | ||
'uri' => '?base_uri=http://localhost:'.$elasticSearchPort.'/', | ||
'port' => $port['from'], | ||
'label' => 'Mobz Head', | ||
]); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<?php | ||
|
||
namespace Ph3\DockerArch\Application\Service; | ||
|
||
use Ph3\DockerArch\Domain\Service\Model\AbstractService; | ||
use Ph3\DockerArch\Domain\Service\Model\ServiceInterface; | ||
use Symfony\Component\OptionsResolver\Options; | ||
use Symfony\Component\OptionsResolver\OptionsResolver; | ||
|
||
/** | ||
* @author Cédric Dugat <[email protected]> | ||
*/ | ||
class ElasticsearchHeadService extends AbstractService implements HasParentServiceInterface | ||
{ | ||
use ParentServiceTrait; | ||
|
||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function getOptionsResolver(): Options | ||
{ | ||
return new OptionsResolver(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters