-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
121 lines (119 loc) · 4.08 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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
services:
processor:
image: gradle:7.6-jdk17-focal
volumes:
- ./spring/processor:/usr/app
working_dir: /usr/app
command:
- gradle
- bootRun
environment:
SPRING_KAFKA_BOOTSTRAP_SERVERS: broker:29092
SPRING_DATA_MONGODB_HOST: processor.mongo
BOOT_RUN_JAVA_OPTS: -javaagent:build/opentelemetry-javaagent-1.24.0.jar -Dotel.instrumentation.logback-appender.experimental-log-attributes=true -Dotel.javaagent.extensions=build/opentelemetry-extension-kotlin-1.24.0.jar
OTEL_SERVICE_NAME: processor
OTEL_EXPORTER_OTLP_ENDPOINT: http://otel.collector:4317
OTEL_LOGS_EXPORTER: otlp
OTEL_TRACES_EXPORTER: otlp
OTEL_EXPORTER_OTLP_LOGS_ENDPOINT: http://otel.collector:4317
OTEL_METRICS_EXPORTER: none
GRADLE_HOME: /usr/app
web:
image: gradle:7.6-jdk17-focal
volumes:
- ./spring/web:/usr/app
working_dir: /usr/app
command:
- gradle
- bootRun
environment:
SPRING_KAFKA_BOOTSTRAP_SERVERS: broker:29092
BOOT_RUN_JAVA_OPTS: -javaagent:build/opentelemetry-javaagent-1.24.0.jar -Dotel.instrumentation.logback-appender.experimental-log-attributes=true -Dotel.javaagent.extensions=build/opentelemetry-extension-kotlin-1.24.0.jar
OTEL_SERVICE_NAME: web
OTEL_EXPORTER_OTLP_ENDPOINT: http://otel.collector:4317
OTEL_EXPORTER_OTLP_LOGS_ENDPOINT: http://otel.collector:4317
OTEL_LOGS_EXPORTER: otlp
OTEL_TRACES_EXPORTER: otlp
OTEL_METRICS_EXPORTER: otlp
GRADLE_HOME: /usr/app
ports:
- 8080:8080
otel.collector:
image: otel/opentelemetry-collector-contrib:0.75.0
volumes:
- ./otel-collector-config.yaml:/etc/otelcol-contrib/config.yaml
ports:
- "1888:1888" # pprof extension
- "8888:8888" # Prometheus metrics exposed by the collector
- "8889:8889" # Prometheus exporter metrics
- "13133:13133" # health_check extension
- "4317:4317" # OTLP gRPC receiver
- "55679:55679" # zpages extension
prometheus:
image: prom/prometheus:latest
volumes:
- ./prometheus.yml:/etc/prometheus/prometheus.yml
- prometheus-storage:/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'
- '--enable-feature=remote-write-receiver'
ports:
- 9090:9090
grafana.loki:
image: grafana/loki:latest
ports:
- "3100:3100"
command: -config.file=/etc/loki/local-config.yaml
grafana.tempo:
image: grafana/tempo:latest
command: [ "-config.file=/etc/tempo.yaml" ]
volumes:
- ./tempo.yml:/etc/tempo.yaml
- grafana-tempo-storage:/tmp/tempo
ports:
- "14268" # jaeger ingest
- "3200" # tempo
- "4317" # otlp grpc
- "4318" # otlp http
- "9411" # zipkin
grafana:
image: grafana/grafana:latest
volumes:
- grafana-storage:/var/lib/grafana
ports:
- "3000:3000"
depends_on:
- grafana.loki
zookeeper:
image: confluentinc/cp-zookeeper:7.3.3.arm64
environment:
ZOOKEEPER_CLIENT_PORT: 2181
ZOOKEEPER_TICK_TIME: 2000
broker:
image: confluentinc/cp-kafka:7.3.3.arm64
ports:
# To learn about configuring Kafka for access across networks see
# https://www.confluent.io/blog/kafka-client-cannot-connect-to-broker-on-aws-on-docker-etc/
- 9092:9092
depends_on:
- zookeeper
environment:
KAFKA_BROKER_ID: 1
KAFKA_ZOOKEEPER_CONNECT: 'zookeeper:2181'
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_INTERNAL:PLAINTEXT
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://localhost:9092,PLAINTEXT_INTERNAL://broker:29092
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
KAFKA_TRANSACTION_STATE_LOG_MIN_ISR: 1
KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 1
processor.mongo:
image: mongo
ports:
- 27017:27017
volumes:
grafana-storage:
grafana-tempo-storage:
prometheus-storage: