https://github.com/nekonenene/grpc_image
gRPC with Go (golang) and Docker
https://github.com/nekonenene/grpc_image
docker docker-image go golang grpc grpc-go
Last synced: 2 months ago
JSON representation
gRPC with Go (golang) and Docker
- Host: GitHub
- URL: https://github.com/nekonenene/grpc_image
- Owner: nekonenene
- Created: 2019-02-10T05:01:37.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-02-10T20:08:57.000Z (about 7 years ago)
- Last Synced: 2024-12-30T06:15:41.545Z (over 1 year ago)
- Topics: docker, docker-image, go, golang, grpc, grpc-go
- Language: Makefile
- Size: 20.5 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# gRPC image
gRPC with Go (golang) and Docker
## Requirement
* Docker
## Usage
1. Build images.
```sh
make build
```
Or, define [the version of protoc](https://github.com/protocolbuffers/protobuf/releases).
```sh
make build PROTOC_VER=x.x.x
```
2. Run the container to start the gRPC server.
```sh
make run
```
## Development
1. Put symlink, but **it's not necessary** if you develop in the docker container.
```sh
make init
```
2. When update `hello.proto`, you should also update `hello.pb.go`.
```sh
make pb_hello
```
3. When update `main.go`, rebuild the image and rerun the container.
```sh
make build_hello
make run
```
## Use TLS (SSL)
```sh
go run main.go -tls -cert_file ./creds/server.crt -key_file ./creds/server.key
```