diff --git a/cli/ValetPlus/Elasticsearch.php b/cli/ValetPlus/Elasticsearch.php index b5c142c2..2379cfab 100644 --- a/cli/ValetPlus/Elasticsearch.php +++ b/cli/ValetPlus/Elasticsearch.php @@ -18,11 +18,11 @@ class Elasticsearch extends AbstractDockerService protected const NGINX_CONFIGURATION_PATH = VALET_HOME_PATH . '/Nginx/elasticsearch.conf'; /** @var string */ - protected const ES_DEFAULT_VERSION = 'opensearch'; // which is v2 in Brew, @todo; maybe support v1.2 using docker? + protected const ES_DEFAULT_VERSION = 'opensearch2'; /** @var string[] */ - protected const ES_SUPPORTED_VERSIONS = ['opensearch', 'elasticsearch6', 'elasticsearch7', 'elasticsearch8']; + protected const ES_SUPPORTED_VERSIONS = ['opensearch2', 'elasticsearch6', 'elasticsearch7', 'elasticsearch8']; /** @var string[] */ - protected const ES_DOCKER_VERSIONS = ['elasticsearch6', 'elasticsearch7', 'elasticsearch8']; + protected const ES_DOCKER_VERSIONS = ['opensearch2', 'elasticsearch6', 'elasticsearch7', 'elasticsearch8']; /** @var string[] */ protected const ES_EOL_VERSIONS = ['elasticsearch@6']; diff --git a/cli/stubs/elasticsearch/opensearch2/docker-compose.yml b/cli/stubs/elasticsearch/opensearch2/docker-compose.yml new file mode 100644 index 00000000..3f204af6 --- /dev/null +++ b/cli/stubs/elasticsearch/opensearch2/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3' + +services: + opensearch: + image: opensearchproject/opensearch:2.12.0 + container_name: unspsc-opensearch + environment: + plugins.security.disabled: true + discovery.type: single-node + node.name: opensearch + OPENSEARCH_JAVA_OPTS: -Xms512m -Xmx512m + OPENSEARCH_INITIAL_ADMIN_PASSWORD: Som3F4ncyPWD! + + volumes: + - opensearch-data:/usr/share/opensearch/data + ports: + - 9200:9200 + - 9600:9600 + +volumes: + opensearch-data: + driver: local