Skip to content

Commit 74e9dbf

Browse files
authored
Add Docker Compose configuration and quick start guide (#34)
Introduce a Docker Compose setup for the Envoy and echo services, along with a quick start guide in the README to facilitate easy deployment and testing. @mathetake --------- Signed-off-by: Jimmy Song <rootsongjc@gmail.com>
1 parent 3ecccc8 commit 74e9dbf

2 files changed

Lines changed: 49 additions & 0 deletions

File tree

README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,28 @@ If you want to explicitly specify the docker image, use `ENVOY_IMAGE` environmen
8484
ENVOY_IMAGE=foo-bar-image:latest go test . -v -count=1
8585
```
8686

87+
## Quick Start with Docker Compose
88+
89+
To quickly start the example, you can use `docker-compose` to set up the environment:
90+
91+
```bash
92+
docker-compose up -d
93+
```
94+
95+
This will start the Envoy proxy along with the echo server in the background. Once the setup is complete, you can test the example by running:
96+
97+
```bash
98+
curl localhost:1062/uuid
99+
```
100+
101+
This command tests the passthrough and access log filters. If the setup is successful, you should see a response like:
102+
103+
```
104+
Hello from echo server
105+
```
106+
107+
You can also explore other endpoints defined in the `envoy.yaml` configuration.
108+
87109
[5b88f941da971de57f29286103c20770811ec67f]: https://github.com/envoyproxy/envoy/tree/5b88f941da971de57f29286103c20770811ec67f
88110
[Envoy]: https://github.com/envoyproxy/envoy
89111
[High Level Doc]: https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/advanced/dynamic_modules

docker-compose.yaml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
services:
2+
envoy:
3+
image: envoy-with-dynamic-modules:latest
4+
container_name: envoy
5+
ports:
6+
- "1062:1062"
7+
- "1063:1063"
8+
- "1064:1064"
9+
volumes:
10+
- ./:/examples
11+
working_dir: /examples/integration
12+
command: ["/bin/sh", "-c", "mkdir -p ./access_logs && envoy --config-path ./envoy.yaml"]
13+
networks:
14+
- envoy-net
15+
16+
echo:
17+
image: hashicorp/http-echo
18+
depends_on:
19+
- envoy
20+
network_mode: "container:envoy"
21+
command:
22+
- "-listen=127.0.0.1:1234"
23+
- "-text=Hello from echo server"
24+
25+
networks:
26+
envoy-net:
27+
driver: bridge

0 commit comments

Comments
 (0)