-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
74 lines (70 loc) · 1.83 KB
/
docker-compose.yaml
File metadata and controls
74 lines (70 loc) · 1.83 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
services:
throttle-proxy:
build:
context: .
dockerfile: sandbox/Dockerfile.throttle-proxy
command: >
-upstream=http://traffic-server:6999
-insecure-listen-address=0.0.0.0:7777
-internal-listen-address=0.0.0.0:7776
-proxy-write-timeout=1m
-proxy-read-timeout=1m
-proxy-paths=/api/v1/query
-enable-jitter=true
-jitter-delay=1s
-enable-observer=true
-enable-blocker=true
-block-pattern=X-User-Agent=to-block.*
-enable-bp=true
-bp-monitoring-url=http://prom:9090
-bp-min-window=1
-bp-max-window=10
-bp-query=sum\(rate\(proxymw_request_count[1m]\)\)
-bp-query-name=proxy_rps
-bp-warn=0.2
-bp-emergency=2
-bp-query="up"
-bp-query-name=up_jobs
-bp-warn=100
-bp-emergency=200
-enable-low-cost-bypass
ports:
- 7777:7777
- 7776:7776
depends_on:
- traffic-server
traffic-server:
build:
context: .
dockerfile: sandbox/Dockerfile.traffic-server
container_name: traffic-server
ports:
- "6999:6999" # Expose the server's port
environment:
LATENCY: 5 # Mock latency for the server
ERROR_RATE: 0.1 # Rate of 5xx errors from the server
grafana:
image: grafana/grafana:11.1.7
container_name: grafana
ports:
- 3000:3000
volumes:
- ./sandbox/grafana/provisioning:/etc/grafana/provisioning
- ./sandbox/grafana/grafana.ini:/etc/grafana/grafana.ini
environment:
- GF_SECURITY_ADMIN_PASSWORD=admin
- GF_LOG_LEVEL=error
depends_on:
- prom
prom:
image: prom/prometheus
ports:
- 9090:9090
configs:
- prometheus.yml
command: --config.file=/prometheus.yml --log.level=debug
depends_on:
- throttle-proxy
configs:
prometheus.yml:
file: sandbox/prometheus.yml