From 2cacf9cfb588348daf2aa19d613fe0c36b61599d Mon Sep 17 00:00:00 2001 From: Muayyad alsadi Date: Fri, 18 Mar 2022 23:00:21 +0300 Subject: [PATCH] add echo example --- examples/echo/README.md | 31 +++++++++++++++++++++++++++++++ examples/echo/docker-compose.yaml | 8 ++++++++ 2 files changed, 39 insertions(+) create mode 100644 examples/echo/README.md create mode 100644 examples/echo/docker-compose.yaml diff --git a/examples/echo/README.md b/examples/echo/README.md new file mode 100644 index 0000000..3fcc888 --- /dev/null +++ b/examples/echo/README.md @@ -0,0 +1,31 @@ +# Echo Service example + +``` +podman-compose up +``` + +Test the service with `curl like this` + +``` +$ curl -X POST -d "foobar" http://localhost:8080/; echo + +CLIENT VALUES: +client_address=10.89.31.2 +command=POST +real path=/ +query=nil +request_version=1.1 +request_uri=http://localhost:8080/ + +SERVER VALUES: +server_version=nginx: 1.10.0 - lua: 10001 + +HEADERS RECEIVED: +accept=*/* +content-length=6 +content-type=application/x-www-form-urlencoded +host=localhost:8080 +user-agent=curl/7.76.1 +BODY: +foobar +``` diff --git a/examples/echo/docker-compose.yaml b/examples/echo/docker-compose.yaml new file mode 100644 index 0000000..ef0d010 --- /dev/null +++ b/examples/echo/docker-compose.yaml @@ -0,0 +1,8 @@ +--- +version: '3' +services: + web: + image: k8s.gcr.io/echoserver:1.4 + ports: + - "${HOST_PORT:-8080}:8080" +