<commit_before><?php

namespace Ph3\DockerArch\Application\DockerContainer;

use Ph3\DockerArch\Application\Architect;
use Ph3\DockerArch\Application\Service\CerebroService;
use Ph3\DockerArch\Application\Service\ElasticsearchHeadService;
use Ph3\DockerArch\Domain\DockerContainer\Model\DockerContainer;
use Ph3\DockerArch\Domain\DockerContainer\Model\DockerContainerInterface;

/**
 * @author <NAME> <<EMAIL>>
 */
class ElasticsearchDockerContainer extends DockerContainer
{
    /**
     * {@inheritdoc}
     */
    public function getPackageManager(): string
    {
        return DockerContainerInterface::PACKAGE_MANAGER_TYPE_APK;
    }

    /**
     * {@inheritdoc}
     */
    public function preExecute(): void
    {
        $service = $this->getService();
        if (true === $service->getOptions()['with_management']) {
            $service
                ->getProject()
                ->addService(CerebroService::getInstanceForParentService($service))
                ->addService(ElasticsearchHeadService::getInstanceForParentService($service));
        }
    }

    /**
     * {@inheritdoc}
     */
    public function execute(): void
    {
        $service = $this->getService();
        $project = $service->getProject();

        $this->setFrom(sprintf('blacktop/elasticsearch:%s', $service->getOptions()['version']));

        // Commands.
        if (true === $service->getOptions()['with_management']) {
            $this
                ->addCommand('echo "http.cors.enabled: true" >> /usr/share/elasticsearch/config/elasticsearch.yml')
                ->addCommand(
                    'echo "http.cors.allow-origin: \\"*\\"" >> /usr/share/elasticsearch/config/elasticsearch.yml'
                );
        }

        $project
            ->addEnv('ELASTIC_SEARCH_DATA_LOCATION', Architect::GLOBAL_ABSOLUTE_TMP_DIRECTORY.'/data/elasticsearch');<commit_msg>ElasticSearch Docker image update<commit_after><?php

namespace Ph3\DockerArch\Application\DockerContainer;

use Ph3\DockerArch\Application\Architect;
use Ph3\DockerArch\Application\Service\CerebroService;
use Ph3\DockerArch\Application\Service\ElasticsearchHeadService;
use Ph3\DockerArch\Domain\DockerContainer\Model\DockerContainer;
use Ph3\DockerArch\Domain\DockerContainer\Model\DockerContainerInterface;

/**
 * @author <NAME> <<EMAIL>>
 */
class ElasticsearchDockerContainer extends DockerContainer
{
    /**
     * {@inheritdoc}
     */
    public function getPackageManager(): string
    {
        return DockerContainerInterface::PACKAGE_MANAGER_TYPE_APK;
    }

    /**
     * {@inheritdoc}
     */
    public function preExecute(): void
    {
        $service = $this->getService();
        if (true === $service->getOptions()['with_management']) {
            $service
                ->getProject()
                ->addService(CerebroService::getInstanceForParentService($service))
                ->addService(ElasticsearchHeadService::getInstanceForParentService($service));
        }
    }

    /**
     * {@inheritdoc}
     */
    public function execute(): void
    {
        $service = $this->getService();
        $project = $service->getProject();

        $this->setFrom(sprintf('elasticsearch:%s', $service->getOptions()['version']));

        // Commands.
        if (true === $service->getOptions()['with_management']) {
            $this
                ->addCommand('echo "http.cors.enabled: true" >> /usr/share/elasticsearch/config/elasticsearch.yml')
                ->addCommand(
                    'echo "http.cors.allow-origin: \\"*\\"" >> /usr/share/elasticsearch/config/elasticsearch.yml'
                );
        }

        $project
            ->addEnv('ELASTIC_SEARCH_DATA_LOCATION', Architect::GLOBAL_ABSOLUTE_TMP_DIRECTORY.'/data/elasticsearch');
{'fraction_non_alphanumeric': 0.13929424250464315, 'fraction_numerical': 0.003183868400106129, 'mean_word_length': 2.7889447236180906, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 43, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6815811', 'n_tokens_mistral': 1068, 'n_tokens_neox': 1058, 'n_words': 138}