Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/s1lver/rr-grpc-tls-php
Implementing a simple example of client-server communication using TLS in Docker
https://github.com/s1lver/rr-grpc-tls-php
docker grpc php8 roadrunner tls
Last synced: 18 days ago
JSON representation
Implementing a simple example of client-server communication using TLS in Docker
- Host: GitHub
- URL: https://github.com/s1lver/rr-grpc-tls-php
- Owner: s1lver
- License: gpl-3.0
- Created: 2022-06-21T10:31:22.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-10-09T17:04:13.000Z (about 2 years ago)
- Last Synced: 2024-04-17T14:24:57.666Z (7 months ago)
- Topics: docker, grpc, php8, roadrunner, tls
- Language: PHP
- Homepage:
- Size: 40 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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
```bash
make build-client
```Build the server part
```bash
make build-server
```## Additional commands
Stop a running container with a server
```bash
make down-server
```Stop a running container with a client
```bash
make down-client
```Running container with a server
```bash
make start-server
```Running container with a client
```bash
make start-client
```## Create certificates
```bash
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
```bash
docker exec -it client-php php ping.php
```
or```bash
docker exec -it client-php bash
php ping.php
```Response
> Status code: 0
>
> Status details:
>
> 2022-06-21 13:44:39: PONG