-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
100 lines (100 loc) · 2.98 KB
/
docker-compose.yml
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
services:
service-a:
image: node/service-a:base-inst
depends_on:
service-b:
condition: service_healthy
environment:
OPENTELEMETRY_TRACER_EXPORTER_OTLP_ENDPOINT: "http://otel-collector:4317"
SERVICEB_URL: "http://service-b:8081"
KAFKA_BOOTSTRAP_SERVERS: "kafka:9092"
ports:
- "8080:8080"
service-b:
image: spring/service-b:base-inst
depends_on:
kafka:
condition: service_healthy
environment:
JAVA_TOOL_OPTIONS: "-javaagent:/app/lib/opentelemetry-javaagent-1.22.1.jar"
OTEL_SERVICE_NAME: "service-b(Spring)"
OTEL_EXPORTER_OTLP_ENDPOINT: "http://otel-collector:4317"
OTEL_METRICS_EXPORTER: "none"
SPRING_KAFKA_PRODUCER_BOOTSTRAP-SERVERS: "kafka:9092"
ports:
- "8081:8081"
healthcheck:
test: [ "CMD", "curl", "-f", "http://localhost:8081/actuator/health" ]
start_period: 60s
interval: 10s
timeout: 10s
retries: 12
service-c:
image: quarkus/service-c:base-inst
depends_on:
service-b:
condition: service_healthy
environment:
QUARKUS_OPENTELEMETRY_TRACER_EXPORTER_OTLP_ENDPOINT: "http://otel-collector:4317"
ports:
- "8082:8082"
service-d:
image: quarkus/service-d:base-inst
depends_on:
service-b:
condition: service_healthy
environment:
QUARKUS_DATASOURCE_JDBC_URL: "jdbc:postgresql://database:5432/a_service"
QUARKUS_OPENTELEMETRY_TRACER_EXPORTER_OTLP_ENDPOINT: "http://otel-collector:4317"
ports:
- "8083:8083"
zookeeper:
image: quay.io/strimzi/kafka:0.33.0-kafka-3.3.2
command: [
"sh", "-c",
"bin/zookeeper-server-start.sh config/zookeeper.properties"
]
ports:
- "2181:2181"
environment:
ZOOKEEPER_CLIENT_PORT: 2181
LOG_DIR: /tmp/logs
kafka:
image: quay.io/strimzi/kafka:0.33.0-kafka-3.3.2
command: [
"sh", "-c",
"bin/kafka-server-start.sh config/server.properties --override listeners=$${KAFKA_LISTENERS} --override advertised.listeners=$${KAFKA_ADVERTISED_LISTENERS} --override zookeeper.connect=$${KAFKA_ZOOKEEPER_CONNECT}"
]
depends_on:
- zookeeper
ports:
- "9092:9092"
environment:
LOG_DIR: "/tmp/logs"
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:9092
KAFKA_LISTENERS: PLAINTEXT://0.0.0.0:9092
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
KAFKA_CREATE_TOPICS: "topic-b:1:1, topic-d:1:1"
healthcheck:
test: nc -z localhost 9092 || exit -1
start_period: 30s
interval: 5s
timeout: 10s
retries: 10
otel-collector:
image: otel/opentelemetry-collector:latest
command: [ "--config=/etc/otel-collector-config.yaml" ]
volumes:
- ./otel-collector-config.yaml:/etc/otel-collector-config.yaml:Z
ports:
- "13133:13133"
- "4317:4317"
- "4318:4318"
depends_on:
- jaeger
jaeger:
image: jaegertracing/all-in-one:latest
ports:
- "16686:16686"
- "14268:14268"
- "14250:14250"