-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
129 lines (122 loc) · 3.43 KB
/
docker-compose.dev.yml
File metadata and controls
129 lines (122 loc) · 3.43 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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
services:
# Zipkin - Distributed Tracing UI and Storage
zipkin:
image: openzipkin/zipkin:latest
container_name: zipkin
ports:
- "9411:9411" # Zipkin UI and HTTP API
environment:
- STORAGE_TYPE=mem
- JAVA_OPTS=-Xms512m -Xmx512m
networks:
- observability
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:9411/health"]
interval: 10s
timeout: 5s
retries: 3
labels:
- "traefik.enable=false"
# OpenTelemetry Collector
otel-collector:
image: otel/opentelemetry-collector-contrib:0.130.0
container_name: otel-collector
command: ["--config=/etc/otel-collector-config.yaml"]
volumes:
- ./otel-collector-config.yaml:/etc/otel-collector-config.yaml
ports:
- "8888:8888" # Prometheus metrics
- "8889:8889" # Prometheus metrics (alternative)
- "13133:13133" # Health check
- "4317:4317" # OTLP gRPC
- "4318:4318" # OTLP HTTP
- "9412:9411" # Zipkin receiver (mapped to 9412 to avoid conflict with Zipkin UI)
networks:
- observability
# Prometheus - Metrics Storage
prometheus:
image: prom/prometheus:latest
container_name: prometheus
ports:
- "9090:9090"
volumes:
- ./prometheus.yml:/etc/prometheus/prometheus.yml
- 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:
- observability
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:9090/"]
interval: 10s
timeout: 5s
retries: 3
# Grafana - Metrics and Tracing Visualization
grafana:
image: grafana/grafana:latest
container_name: grafana
ports:
- "3000:3000"
environment:
- GF_SECURITY_ADMIN_PASSWORD=admin
- GF_FEATURE_TOGGLES_ENABLE=traceqlEditor
volumes:
- grafana_data:/var/lib/grafana
- ./grafana/provisioning:/etc/grafana/provisioning
- ./grafana/dashboards:/var/lib/grafana/dashboards
depends_on:
prometheus:
condition: service_healthy
zipkin:
condition: service_healthy
networks:
- observability
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:3000/"]
interval: 10s
timeout: 5s
retries: 3
# Redis - For caching and session storage
redis:
image: redis:7-alpine
container_name: redis
ports:
- "6379:6379"
volumes:
- redis_data:/data
command: redis-server --appendonly yes
networks:
- observability
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 3s
retries: 3
# Docs - MkDocs TechDocs site
docs:
build:
context: .
dockerfile: Dockerfile.docs
container_name: docs
volumes:
- ./mkdocs.yml:/site/mkdocs.yml:ro
- ./docs:/site/docs:ro
ports:
- "8000:8000"
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:8000/"]
interval: 10s
timeout: 5s
retries: 3
restart: unless-stopped
networks:
observability:
driver: bridge
volumes:
prometheus_data:
grafana_data:
redis_data: