Skip to content

Commit

Permalink
Use Docker for Opensearch 2
Browse files Browse the repository at this point in the history
  • Loading branch information
mischabraam committed Oct 14, 2024
1 parent 2e653ba commit ca67f20
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cli/ValetPlus/Elasticsearch.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'];

Expand Down
22 changes: 22 additions & 0 deletions cli/stubs/elasticsearch/opensearch2/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit ca67f20

Please sign in to comment.