-
Notifications
You must be signed in to change notification settings - Fork 87
Expand file tree
/
Copy pathcompose.yaml
More file actions
128 lines (121 loc) · 3.65 KB
/
compose.yaml
File metadata and controls
128 lines (121 loc) · 3.65 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
services:
db:
image: postgres:17.6
container_name: library-db
environment:
POSTGRES_DB: library
POSTGRES_USER: test
POSTGRES_PASSWORD: test
ports:
- "5432:5432"
jaeger:
image: cr.jaegertracing.io/jaegertracing/jaeger:2.10.0
container_name: library-jaeger
ports:
- "16686:16686" # Jaeger UI
- "4317:4317" # OTLP gRPC ingest
- "4318:4318" # OTLP HTTP ingest
- "5778:5778" # Remote sampling (HTTP)
- "9411:9411" # Zipkin compatible ingest (optional)
loki:
image: grafana/loki:3.5.7
container_name: library-loki
command: -config.file=/etc/loki/config.yaml
volumes:
- ./loki/loki-config.yaml:/etc/loki/config.yaml:ro
ports:
- "3100:3100"
healthcheck:
test: ["CMD-SHELL", "wget --no-verbose --tries=1 --spider http://localhost:3100/ready || exit 1"]
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
tempo:
image: grafana/tempo:2.9.0
container_name: library-tempo
command: [ "-config.file=/etc/tempo/tempo.yaml" ]
volumes:
- ./tempo/tempo-config.yaml:/etc/tempo/tempo.yaml:ro
ports:
- "3200:3200" # Tempo HTTP API
- "4311:4317" # OTLP gRPC
- "4312:4318" # OTLP HTTP
otel-collector:
image: otel/opentelemetry-collector-contrib:0.137.0
container_name: library-otel-collector
command: [ "--config=/etc/otelcol/config.yaml" ]
volumes:
- ./otel/otel-collector-config.yaml:/etc/otelcol/config.yaml:ro
- ./logs:/var/log/app
ports:
- "4315:4317" # OTLP gRPC
- "4316:4318" # OTLP HTTP
depends_on:
loki:
condition: service_healthy
tempo:
condition: service_started
prometheus:
image: prom/prometheus:v3.7.1
container_name: library-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'
- '--enable-feature=exemplar-storage'
- '--web.enable-remote-write-receiver'
- '--enable-feature=native-histograms'
volumes:
- ./prometheus/prometheus.yml:/etc/prometheus/prometheus.yml:ro
ports:
- "9090:9090"
extra_hosts:
- "host.docker.internal:host-gateway"
grafana:
image: grafana/grafana:12.2.1
container_name: library-grafana
environment:
- GF_SECURITY_ADMIN_USER=admin
- GF_SECURITY_ADMIN_PASSWORD=xpinjection
- GF_USERS_ALLOW_SIGN_UP=false
volumes:
- ./grafana/datasources:/etc/grafana/provisioning/datasources:ro
ports:
- "3000:3000"
depends_on:
- prometheus
- loki
- tempo
library-app:
profiles: ["perftest"]
image: xpinjection.com/library:perf-test
container_name: library-app
environment:
- SPRING_PROFILES_ACTIVE=admin,perftest
- SPRING_SECURITY_USER_NAME=admin
- SPRING_SECURITY_USER_PASSWORD=xpinjection
- SERVER_TOMCAT_THREADS_MAX=200
- SERVER_TOMCAT_MAX_CONNECTIONS=1000
- JAVA_TOOL_OPTIONS=-XX:InitialRAMPercentage=80.0 -XX:MaxRAMPercentage=80.0 -XX:MaxMetaspaceSize=128m
ports:
- "8080:8080"
deploy:
resources:
limits:
cpus: '2.0'
memory: 2G
reservations:
memory: 2G
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:8080/admin/health/readiness"]
interval: 10s
timeout: 5s
retries: 3
start_period: 10s
depends_on:
db:
condition: service_started
otel-collector:
condition: service_started