-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multiple projects and internal curl request #2180
Comments
I have the same issue. |
I fixed it like this : |
extra_hosts does not help for me.
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Hi again 👋 we would like to inform you that this issue has been automatically |
In any of these cases did you use curl? I can't run Curl between projects ... |
Eu consertei assim:
|
Esse IP 192 é o seu IP local? |
Sim. No meu caso ficou assim. |
Entendi. E como fazia o curl? Com o endereço mesmo ou IP? Tipo "http://site1.development/api/list" ou IP mesmo? |
No CURL eu utilizo assim: http://site1.development:8081/api/list |
Info:
$ docker --version
): 18.09.2, build 6247962$ git rev-parse HEAD
): 23193baIssue:
I configured my laradock project in order to use multiples projects, so my directory structure looks like this:
/var/www/html/
- laradock
- project1
- project2
Everything is working fine, my containers are up and running an i can make http requests from outside using postman for example to each domain host like puf.loc and api.puf.loc and everything is ok.
My problem is that when project1 (puf.loc) wants to make an internal request using curl to project2 (api.puf.loc) im getting a connection refused message.
Making some research on google i found a post that indicates that i need to create add to the extra_hosts parameter in the docker-compose.yaml file for the php-fpm service the following entries:
And then run the following command:
docker-compose up -d --build nginx mysql redis beanstalkd memcached
But still no working.. i tried changing ${DOCKER_HOST_IP} with the ip of the nginx container and with no success. Have tried too with 127.0.0.1 and without response.
I understand that inside the container, when we make a request to a host like api.puf.loc, we need a entry in the /etc/hosts pointing to 127.0.0.1 but i can get working my two projects together inside the same container (multiple projects)
Can anyone help me with this??
Thank you guys!
Expected behavior:
I need that my project1 (puf.loc), can make a internal request via curl to my project2 (api.puf.loc) using the laradock for multiple projects.
The text was updated successfully, but these errors were encountered: