Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
65 lines (61 loc) · 2.51 KB
/
Copy pathdocker-compose.yml
File metadata and controls
65 lines (61 loc) · 2.51 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
services:
# ---------------------------------------------------------------------------
# hello_server — C++ gRPC service
# ---------------------------------------------------------------------------
hello:
build:
context: .
dockerfile: Dockerfile
image: hello_server:0.1.0
environment:
- GRPC_PORT=50051
- METRICS_PORT=9090
- LOG_LEVEL=info
- OTEL_EXPORTER_OTLP_ENDPOINT=otel-collector:4317
ports:
- "50051:50051" # gRPC
- "9090:9090" # Prometheus metrics
depends_on:
- otel-collector
restart: unless-stopped
# ---------------------------------------------------------------------------
# Envoy proxy — REST→gRPC transcoding on :8080
# The proto.pb descriptor set is generated by CMake into ${builddir}/proto.pb
# and must be present before starting docker compose.
# ---------------------------------------------------------------------------
envoy:
image: envoyproxy/envoy:v1.31.0
ports:
- "8080:8080" # REST/JSON ingress
- "9901:9901" # Envoy admin interface
volumes:
- ./deploy/envoy/envoy.yaml:/etc/envoy/envoy.yaml:ro
# Mount the generated proto descriptor set (produced by cmake --build).
# Path matches cmake_layout output: build/Release/ (capital R).
- ./build/Release/proto.pb:/etc/envoy/proto.pb:ro
command: ["envoy", "-c", "/etc/envoy/envoy.yaml"]
depends_on:
- hello
restart: unless-stopped
# ---------------------------------------------------------------------------
# OpenTelemetry Collector — receives OTLP/gRPC traces from hello_server
# ---------------------------------------------------------------------------
otel-collector:
image: otel/opentelemetry-collector-contrib:0.96.0
ports:
- "4317:4317" # OTLP/gRPC receiver
- "4318:4318" # OTLP/HTTP receiver
volumes:
- ./deploy/otel-collector/otel-collector-config.yaml:/etc/otel-collector-config.yaml:ro
command: ["--config=/etc/otel-collector-config.yaml"]
restart: unless-stopped
# ---------------------------------------------------------------------------
# Prometheus — scrapes hello_server :9090/metrics every 15 s
# ---------------------------------------------------------------------------
prometheus:
image: prom/prometheus:v2.50.1
ports:
- "9091:9090" # Prometheus UI (mapped to 9091 to avoid conflict)
volumes:
- ./deploy/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml:ro
restart: unless-stopped