-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
112 lines (104 loc) · 2.31 KB
/
Copy pathdocker-compose.yml
File metadata and controls
112 lines (104 loc) · 2.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
version: '3.8'
services:
# Echo servers (backend targets)
echo-server-1:
build:
context: ..
dockerfile: benchmark/Dockerfile.echo-server
container_name: echo-server-1
ports:
- "8081:8080"
environment:
- SERVER_PORT=8080
- SERVER_ID=1
networks:
- benchmark-network
echo-server-2:
build:
context: ..
dockerfile: benchmark/Dockerfile.echo-server
container_name: echo-server-2
ports:
- "8082:8080"
environment:
- SERVER_PORT=8080
- SERVER_ID=2
networks:
- benchmark-network
echo-server-3:
build:
context: ..
dockerfile: benchmark/Dockerfile.echo-server
container_name: echo-server-3
ports:
- "8083:8080"
environment:
- SERVER_PORT=8080
- SERVER_ID=3
networks:
- benchmark-network
# BunGate API Gateway
bungate:
build:
context: ..
dockerfile: benchmark/Dockerfile.bungate
container_name: bungate
ports:
- "3000:3000"
depends_on:
- echo-server-1
- echo-server-2
- echo-server-3
environment:
- GATEWAY_PORT=3000
- TARGETS=http://echo-server-1:8080,http://echo-server-2:8080,http://echo-server-3:8080
networks:
- benchmark-network
# Nginx API Gateway
nginx:
image: nginx:1.25-alpine
container_name: nginx
ports:
- "3001:80"
depends_on:
- echo-server-1
- echo-server-2
- echo-server-3
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
networks:
- benchmark-network
# Envoy API Gateway
envoy:
image: envoyproxy/envoy:v1.28-latest
container_name: envoy
ports:
- "3002:8080"
depends_on:
- echo-server-1
- echo-server-2
- echo-server-3
volumes:
- ./envoy.yaml:/etc/envoy/envoy.yaml:ro
command: ["/usr/local/bin/envoy", "-c", "/etc/envoy/envoy.yaml"]
networks:
- benchmark-network
# wrk benchmark tool
wrk:
build:
context: .
dockerfile: Dockerfile.wrk
container_name: wrk
depends_on:
- bungate
- nginx
- envoy
volumes:
- ./results:/results
- ./scripts:/scripts
networks:
- benchmark-network
command: ["tail", "-f", "/dev/null"] # Keep container running
networks:
benchmark-network:
driver: bridge