Closed davoodf1995 closed 12 months 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?
not working not connecting to docker with this package I try with localhost 127.0.0.1 and es-container
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
Hi, why not connect in docker my docker compose `version: '3' networks: default: ipam: config:
subnet: 172.16.0.0/16 services: nginx: image: nginx:alpine container_name: nginx logging: options: max-size: "5m" max-file: "10" volumes:
- "./etc/ssl/:/etc/ssl/trust"
environment:
command: /bin/sh -c "nginx -g 'daemon off;'" restart: always network_mode: host
nginx-php-stage: image: yaroodf/nginx-php:8.1 container_name: nginx-php-stage restart: always logging: options: max-size: "5m" max-file: "10" volumes:
- "./etc/ssl/:/etc/ssl/trust"
networks:
depends_on:
phpmyadmin: image: phpmyadmin logging: options: max-size: "5m" max-file: "10" container_name: phpmyadmin ports:
mysql: image: mariadb:10.9 logging: options: max-size: "5m" max-file: "10" container_name: mysql restart: always
env_file:
- ".env"
environment:
- MYSQL_DATABASE=${MYSQL_DATABASE}
- MYSQL_USER=${MYSQL_USER}
- MYSQL_PASSWORD=${MYSQL_PASSWORD}
ports:
redis: image: 'bitnami/redis:7.0.9' ports:
volumes:
- '/path/to/redis-persistence:/bitnami'
networks:
elasticsearch: container_name: es-container image: docker.elastic.co/elasticsearch/elasticsearch:8.7.0 environment:
ports:
- 9200:9200
kibana: container_name: kb-container image: docker.elastic.co/kibana/kibana:8.7.0 environment:
and my env in laravel is
ES_HOSTS="http://es-container:9200"