-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathdocker-compose.observability-local.yml
More file actions
98 lines (92 loc) · 2.88 KB
/
docker-compose.observability-local.yml
File metadata and controls
98 lines (92 loc) · 2.88 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
# docker-compose.observability-local.yml - Observability stack for local mockd
#
# Use this when running mockd locally (not in Docker).
# mockd should be started separately with: ./mockd serve
#
# Usage:
# docker-compose -f docker-compose.observability-local.yml up -d
# ./mockd serve # In another terminal
#
# Access:
# - mockd Mock Server: http://localhost:4280 (local)
# - mockd Admin API: http://localhost:4290 (local)
# - Prometheus: http://localhost:9090
# - Jaeger UI: http://localhost:16686
# - Grafana: http://localhost:3000 (admin/admin)
# - Loki: http://localhost:3100 (for log queries)
services:
prometheus:
image: prom/prometheus:v2.48.0
container_name: prometheus
restart: unless-stopped
ports:
- "9090:9090"
volumes:
- ./observability/prometheus-local.yml:/etc/prometheus/prometheus.yml:ro
- ./observability/prometheus/rules:/etc/prometheus/rules: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'
extra_hosts:
- "host.docker.internal:host-gateway"
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"
loki:
image: grafana/loki:2.9.2
container_name: loki
restart: unless-stopped
ports:
- "3100:3100"
volumes:
- ./observability/loki/loki-config.yml:/etc/loki/local-config.yaml:ro
- loki-data:/loki
command: -config.file=/etc/loki/local-config.yaml
promtail:
image: grafana/promtail:2.9.2
container_name: promtail
restart: unless-stopped
volumes:
- ./observability/promtail/promtail-config.yml:/etc/promtail/config.yml:ro
- /var/log:/var/log:ro
- /tmp:/tmp
# Mount mockd log directory if you write logs to a file
# - ~/.mockd/logs:/var/log/mockd:ro
command: -config.file=/etc/promtail/config.yml
depends_on:
- loki
extra_hosts:
- "host.docker.internal:host-gateway"
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"
depends_on:
- loki
- prometheus
extra_hosts:
- "host.docker.internal:host-gateway"
volumes:
prometheus-data:
grafana-data:
loki-data: