pelias / docker

Run the Pelias geocoder in docker containers, including example projects.
MIT License
315 stars 218 forks source link

s it possible to point the docker services(api, interpolation, libpostal) to a running elasticsearch cluster instead of your pelias-elasticsearch docker service ? #288

Closed MALKARAJ closed 2 years ago

MALKARAJ commented 2 years ago

Hi @orangejulius ,

is it possible to point this services(api, interpolation, libpostal) to running elasticsearch cluster instead of pelias-elasticsearch docker service

missinglink commented 2 years ago

At the top of the docker-compose.yml you'll find the configuration networks: default: driver: bridge.

This setting allows the services running in docker to communicate with other services running on the host machine.

In the pelias.json file you'll see a configuration for how to find the elasticsearch service in the esclient.hosts section.

Worth noting that this is an advanced configuration and assumed expert knowledge of both docker and linux networking to get right.

Also worth mentioning that trying to start two elasticsearch instances on port 9200 will obviously result in a bind conflict error.

There appears to be an environment variable ELASTIC_HOST which should be set to your alternate address, see the code for where that is used.

MALKARAJ commented 2 years ago

how to create index in this custom elasticsearch cluster -> pelias elastic create doesnt work in this case

MALKARAJ commented 2 years ago

Hi @orangejulius

how to create index in this custom elasticsearch cluster -> pelias elastic create doesnt work in this case

missinglink commented 2 years ago

Why are you repeating messages and @ mentioning Julian again? This isn't good etiquette when I'm helping you.

The information you need to make it work is explained above, along with a caveat that it requires some advanced knowledge, this is the extent of the help we can provide for free in an open-source software issue tracker.

Your issue specifically is resolvable by editing the pelias.json file as I mentioned above.

MALKARAJ commented 2 years ago

hello @missinglink
sorry for the inconvinence caused