Reputation: 494
I am trying to migrate my python application into docker image. current code is crawling data from web and inserting in elastic search cluster running on different machines.
how do define url of external ip of es cluster in docker-compose
Upvotes: 0
Views: 140
Reputation: 104
You can pass external es ip as environment variable in docker-compose:
your-python-service:
image: ...
...
environment:
ES_ADDR: your_es_ip_here
And then read env in your python code:
es_arr = os.environ["ES_ADDR"]
This is one of many possible problem solutions.
Upvotes: 1