pdphilip / laravel-elasticsearch

Laravel Elasticsearch: An Elasticsearch implementation of Laravel's Eloquent ORM
https://elasticsearch.pdphilip.com/
MIT License
94 stars 17 forks source link

not working with docker #7

Closed davoodf1995 closed 12 months ago

davoodf1995 commented 1 year ago

Hi, why not connect in docker my docker compose `version: '3' networks: default: ipam: config:

and my env in laravel is ES_HOSTS="http://es-container:9200"

pdphilip commented 1 year ago

Can you get to the ES instance from within Laravel? Try: return Http::get('http://es-container:9200')->body();

If you can't, then try http://localhost:9200

If you can, then what does the Laravel error say?

davoodf1995 commented 12 months ago

not working not connecting to docker with this package I try with localhost 127.0.0.1 and es-container

pdphilip commented 12 months ago

Hey @davoodf1995 - I'm not sure where it's going wrong for you. Seems it's not a plugin issue, but rather a docker set-up problem; which falls outside the scope of this plugin.

I suggest posting on StackOverflow to get the community to help you out.

I also have my docker ENV on Github, here: https://github.com/pdphilip/docker-LAMP-MR - maybe it helps