I’m getting ready to start integration and E2E tests for my application. In so doing, I’m trying to figure out
- The minimum number of ports I need to expose to commit a small number of queries and mutations
- Making sure that ports are set up correctly so
servercan talk to each other.
I’ve had a look at the ports table, my understanding is that if the tests use a grpc client, the only port I need exposed is 9080, is this correct?
Also, please bear with me as I’m not a docker expert.
It is my understanding that using
docker run will create a new container to run the server. In this case the server will need to communicate with zero through an external port exposed by the image running zero, is this correct? Does this mean that if zero is running on port 5080 within it’s image, in order for the server to talk to dgraph, this port must be exposed? The port chosen to export the internal 5080 port must then be supplied to the server by means of the
--zero flag correct?
However, if we can get by with keeping things small, and we don’t need a separate docker image for the server, we can boot it up within the same image as
docker exec (as is done in the tutorial). In this case, do we still need to expose port 5080?
In the following command (taken form the tutorial), is the
localhost:5080 referring to the machine where docker is running, or an internal image address?
docker exec -it dgraph dgraph server --lru_mb 2048 --zero localhost:5080
Sorry for the long post, just trying to straighten out several ideas.