Skip to content

Latest commit

 

History

History
71 lines (53 loc) · 1.06 KB

README.md

File metadata and controls

71 lines (53 loc) · 1.06 KB

Using gRPC with TLS in Roadrunner

Implementing a simple example of client-server communication using TLS in Docker in PHP

This example is based on https://github.com/spiral/roadrunner-grpc/tree/master/example/echo

Setup

Build the client part

make build-client

Build the server part

make build-server

Additional commands

Stop a running container with a server

make down-server

Stop a running container with a client

make down-client

Running container with a server

make start-server

Running container with a client

make start-client

Create certificates

docker exec -it client-php bash
mkcert --install
mkcert -client localhost 127.0.0.1 ::1 192.168.231.2
mkcert localhost 127.0.0.1 ::1 192.168.231.2
mkcert -CAROOT
cp /root/.local/share/mkcert/rootCA.pem ./rootCA.pem

Test connect

docker exec -it client-php php ping.php

or

docker exec -it client-php bash
php ping.php

Response

Status code: 0

Status details:

2022-06-21 13:44:39: PONG