José Victor
José Victor

Reputation: 335

How to make a request to the same container where the request came out

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.

Upvotes: 0

Views: 878

Answers (1)

Vitor Paiva
Vitor Paiva

Reputation: 56

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

Upvotes: 1

Related Questions