I created two container boleto_api and boleto_web the first is written in ExpressJS and the last is a VueJS application.
Created docker network named boleto and from that I started the containers.. If I ping :ping boleto_api inside container boleto_web I have successful
PING boleto_api (172.21.0.2) 56(84) bytes of data.
64 bytes from boleto_api.boleto (172.21.0.2): icmp_seq=1 ttl=64 time=0.105 ms
64 bytes from boleto_api.boleto (172.21.0.2): icmp_seq=2 ttl=64 time=0.091 ms
But in Fetch API inside VueJS
GET http://boleto_api:3030/pessoas/buscar/11532324723 net::ERR_NAME_NOT_RESOLVED
Part of code:
fetch('http://boleto_api:3030/pessoas/buscar/'+this.$store.state.cpf)
.then(response => response.json())
.then(data => {
this.dadosCliente = data
this.show = false;
});
I dont have sure if the frontend (VueJs) will be successful to do it, if not, how to proceeded ?