https://github.com/paulhendricks/grpc-examples
https://github.com/paulhendricks/grpc-examples
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/paulhendricks/grpc-examples
- Owner: paulhendricks
- Created: 2018-05-10T13:28:59.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-05-18T20:07:27.000Z (over 7 years ago)
- Last Synced: 2025-04-07T05:49:04.043Z (9 months ago)
- Language: Python
- Size: 4.88 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# grpc-examples
Build the gRPC image from the Dockerfile:
```bash
docker build -t grpc .
```
Run the server:
```bash
docker run -it --rm -d -u $(id -u):$(id -g) -v $PWD:$PWD -w $PWD grpc python3 helloworld/greeter_server.py
```
Use the `` that was printed to the screen and run the client:
```bash
docker exec python3 helloworld/greeter_client.py
```
Use the following to re-compile the Python protobuff code if necessary:
```bash
docker run -d -u $(id -u):$(id -g) -v $PWD:$PWD -w $PWD grpc \
python3 -m grpc_tools.protoc -I . \
--python_out=helloworld --grpc_python_out=helloworld helloworld.proto
```