✅ How to deploy gRPC Server + Client via docker
I wish to have a gRPC server and multiple clients connected to said server. In my current setup, I have two Blazor-server clients and a bare-bones console app client.
Only the console app is currently configured as a receiving client.
The goals are:
I've started from scratch and uploaded the project online for you to have a closer look: https://github.com/hailstorm75/GrpcDocker-Experiment
For goal 1 I have tried various combinations of exposing ports in the docker-compose, Dockerfile, even dabbled in configuring servers
Running locally, I'm able to access the server and send a request.
Running via docker, I see the exposed ports, however, I'm unable to send a request.
Opening the port links shown in the image gives me an empty response in the browser, instead of the mapped "Communication with gRPC endpoints must be made through..." message.
I'm testing the communication with the server via Postman. I've tried various ports, combined with enabled and disabled TLS just to be sure.
With goal 2 I'm simply getting a
Only the console app is currently configured as a receiving client.
The goals are:
- Communicate with the server from my local env. to the running docker instance.
- Enable the aforementioned applications to communicate with each other.
I've started from scratch and uploaded the project online for you to have a closer look: https://github.com/hailstorm75/GrpcDocker-Experiment
For goal 1 I have tried various combinations of exposing ports in the docker-compose, Dockerfile, even dabbled in configuring servers
appsettings.json and launchSettings.json. However, all of my attempts are just throwing things at the wall and seeing what sticks, without really understanding where I need to configure the ports.Running locally, I'm able to access the server and send a request.
Running via docker, I see the exposed ports, however, I'm unable to send a request.
Opening the port links shown in the image gives me an empty response in the browser, instead of the mapped "Communication with gRPC endpoints must be made through..." message.
I'm testing the communication with the server via Postman. I've tried various ports, combined with enabled and disabled TLS just to be sure.
With goal 2 I'm simply getting a
SocketException: