[Docker] Container communcation
For example you have two containers running
Container A: need to talk to Container B
Container B, running a node application export port 1337
From container A
docker compose exec -it containerA bash
You can ping container B
nc -v containerB 1337
To check whether the connection is correct
Inside code of container A
this.tRPC = createTRPCProxyClient<ContainerBRouter>({
links: [
httpBatchLink({
url: 'http://conatienrB:1337',
}),
],
})