huridocs / uwazi

Uwazi is a web-based, open-source solution for building and sharing document collections
http://www.uwazi.io
MIT License
240 stars 80 forks source link

`yarn reindex` (reindex_elastic.js) uses hardcoded value `http://localhost:9200/`instead of environment variable ELASTICSEARCH_URL #1592

Closed fititnt closed 6 years ago

fititnt commented 6 years ago

refs fititnt/uwazi-docker/issues/7


At https://github.com/huridocs/uwazi/blob/6fe5a9d790ea61e1105e7c69bbaab46fd51c8335/database/reindex_elastic.js#L42

yarn reindex (reindex_elastic.js) uses hardcoded value http://localhost:9200/instead of environment variable ELASTICSEARCH_URL already recommended on documentation and used at running time on uwazi.

The change for use ELASTICSEARCH_URL would make easier to easier to setup uwazi on a more complex network where Elastic Search is not installed on the same host (or container) than the one running node.

konzz commented 6 years ago

Thanks for reporting this, I did a PR to fix it. Don't hesitate in doing PRs yourself 😄we could use all the help

fititnt commented 6 years ago

I know. That's why I'm testing too.

And yes, this issue in special potentially could be a one-liner.