Skip to content

Instantly share code, notes, and snippets.

@ediblecode
Created February 6, 2020 15:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ediblecode/869c9643f8f781e8faa628746076104b to your computer and use it in GitHub Desktop.
Save ediblecode/869c9643f8f781e8faa628746076104b to your computer and use it in GitHub Desktop.
Run ElasticSearch locally for NICE
docker run -d -e "ES_JAVA_OPTS=-Xms2g -Xmx2g" -p 9200:9200 -v "/$(pwd)/ElasticConfiguration/synonyms.txt:/usr/share/elasticsearch/config/synonyms.txt" -v "/$(pwd)/ElasticConfiguration/stemmer_override.txt:/usr/share/elasticsearch/config/stemmer_override.txt" --name elasticsearch docker.elastic.co/elasticsearch/elasticsearch:6.5.2
@ediblecode
Copy link
Author

Need to run:

wsl -d docker-desktop
sysctl -w vm.max_map_count=262144

as per https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html#docker-prod-prerequisites

@ediblecode
Copy link
Author

Will probably also need to set up an alias, POST to http://localhost:9200/_aliases with:

{
    "actions" : [
        { "add" : { "index" : "nice_integration_tests", "alias" : "nice" } }
    ]
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment