Home > Software design >  How to make a request to the same container where the request came out
How to make a request to the same container where the request came out

Time:11-04

I have this setting in docker-compose.yml causing it to bring up a container with port 8080 exposed.

enter image description here

Inside that container, I have some applications located inside the src directory, separated as sub-modules.

enter image description here

I'm using LARAVEL FRAMEWORK, I made the following configuration to get the API URL. Inside that wrapper_app config, there is the URL php:8080/app which is also an application.

enter image description here

The request is going from "ACADEMY-SAAS" to "APP", but without success.

enter image description here

enter image description here

How to make a folder inside the container communicate with another folder inside the same container via HTTP?

I also tried to put in the docker-compose.yml, inside the php service, the link with itself, but when I upload the container, the error of "recursiveness" is displayed.

CodePudding user response:

Just to check, have you tried localhost:8080 or just localhost? Since it is just communicating with itself, I think it may not need the container name

  • Related