-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathdocker-compose.observability.yml
More file actions
101 lines (95 loc) · 2.59 KB
/
docker-compose.observability.yml
File metadata and controls
101 lines (95 loc) · 2.59 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
# docker-compose.observability.yml - mockd with Prometheus & Jaeger
#
# Usage:
# docker-compose -f docker-compose.observability.yml up -d
#
# Access:
# - mockd Mock Server: http://localhost:4280
# - mockd Admin API: http://localhost:4290
# - Prometheus: http://localhost:9090
# - Jaeger UI: http://localhost:16686
# - Grafana: http://localhost:3000 (admin/admin)
services:
mockd:
build:
context: .
dockerfile: Dockerfile
args:
VERSION: ${MOCKD_VERSION:-dev}
COMMIT: ${MOCKD_COMMIT:-unknown}
image: mockd:latest
container_name: mockd
restart: unless-stopped
ports:
- "4280:4280" # Mock server
- "4290:4290" # Admin API
volumes:
- ./config:/config:ro
- mockd-data:/data
environment:
MOCKD_PORT: "4280"
MOCKD_ADMIN_PORT: "4290"
MOCKD_LOG_LEVEL: "info"
MOCKD_LOG_FORMAT: "json"
# OTLP tracing (when enabled in CLI)
OTEL_EXPORTER_OTLP_ENDPOINT: "http://jaeger:4318"
OTEL_SERVICE_NAME: "mockd"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:4290/health"]
interval: 10s
timeout: 5s
retries: 3
start_period: 5s
networks:
- mockd-net
prometheus:
image: prom/prometheus:v2.48.0
container_name: prometheus
restart: unless-stopped
ports:
- "9090:9090"
volumes:
- ./observability/prometheus.yml:/etc/prometheus/prometheus.yml:ro
- prometheus-data:/prometheus
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus'
- '--web.console.libraries=/etc/prometheus/console_libraries'
- '--web.console.templates=/etc/prometheus/consoles'
- '--web.enable-lifecycle'
networks:
- mockd-net
jaeger:
image: jaegertracing/all-in-one:1.52
container_name: jaeger
restart: unless-stopped
ports:
- "16686:16686" # Jaeger UI
- "4317:4317" # OTLP gRPC
- "4318:4318" # OTLP HTTP
environment:
COLLECTOR_OTLP_ENABLED: "true"
networks:
- mockd-net
grafana:
image: grafana/grafana:10.2.2
container_name: grafana
restart: unless-stopped
ports:
- "3000:3000"
volumes:
- ./observability/grafana/provisioning:/etc/grafana/provisioning:ro
- grafana-data:/var/lib/grafana
environment:
GF_SECURITY_ADMIN_USER: admin
GF_SECURITY_ADMIN_PASSWORD: admin
GF_USERS_ALLOW_SIGN_UP: "false"
networks:
- mockd-net
networks:
mockd-net:
driver: bridge
volumes:
mockd-data:
prometheus-data:
grafana-data: