forked from debezium/debezium-examples
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
145 lines (138 loc) · 4.39 KB
/
docker-compose.yaml
File metadata and controls
145 lines (138 loc) · 4.39 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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
services:
jaeger:
image: jaegertracing/all-in-one:1.47
ports:
- 4317:4317
- 16686:16686
environment:
- COLLECTOR_OTLP_ENABLED=true
kafka:
image: quay.io/debezium/kafka:${DEBEZIUM_VERSION}
ports:
- 9092:9092
- 9093:9093
environment:
- CLUSTER_ID=oh-sxaDRTcyAr6pFRbXyzA
- NODE_ID=1
- NODE_ROLE=combined
- KAFKA_CONTROLLER_QUORUM_VOTERS=1@kafka:9093
- KAFKA_LISTENERS=PLAINTEXT://kafka:9092,CONTROLLER://kafka:9093
- KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://kafka:9092
order-db:
image: quay.io/debezium/example-postgres:${DEBEZIUM_VERSION}
ports:
- 5433:5432
healthcheck:
test: "pg_isready -U postgresuser -d orderdb"
interval: 2s
timeout: 20s
retries: 10
environment:
- POSTGRES_USER=postgresuser
- POSTGRES_PASSWORD=postgrespw
- POSTGRES_DB=orderdb
- PGPASSWORD=postgrespw
shipment-db:
image: quay.io/debezium/example-postgres:${DEBEZIUM_VERSION}
ports:
- 5434:5432
healthcheck:
test: "pg_isready -U postgresuser -d shipmentdb"
interval: 2s
timeout: 20s
retries: 10
environment:
- POSTGRES_USER=postgresuser
- POSTGRES_PASSWORD=postgrespw
- POSTGRES_DB=shipmentdb
- PGPASSWORD=postgrespw
pgadmin:
container_name: pgadmin_container
image: dpage/pgadmin4
environment:
PGADMIN_DEFAULT_EMAIL: ${PGADMIN_DEFAULT_EMAIL:-pgadmin4@pgadmin.org}
PGADMIN_DEFAULT_PASSWORD: ${PGADMIN_DEFAULT_PASSWORD:-admin}
volumes:
- ./servers.json:/pgadmin4/servers.json
ports:
- "${PGADMIN_PORT:-5050}:80"
connect:
image: debezium/strimzi-connect
build:
context: debezium-strimzi
args:
DEBEZIUM_CONNECTOR_VERSION: "${DEBEZIUM_CONNECTOR_VERSION:-2.4.0.Alpha2}"
STRIMZI_VERSION: "${STRIMZI_VERSION:-latest-kafka-3.5.1}"
ports:
- 8083:8083
depends_on:
- kafka
- order-db
environment:
- KAFKA_LOG4J_OPTS=-Dlog4j.configuration=file:/opt/kafka/config/connect-log4j.properties
- KAFKA_CONNECT_BOOTSTRAP_SERVERS=kafka:9092
- |
KAFKA_CONNECT_CONFIGURATION=
key.converter=org.apache.kafka.connect.json.JsonConverter
value.converter=org.apache.kafka.connect.json.JsonConverter
key.converter.schemas.enable=false
value.converter.schemas.enable=false
group.id=connect
offset.storage.topic=connect-offsets
offset.storage.replication.factor=1
config.storage.topic=connect-configs
config.storage.replication.factor=1
status.storage.topic=connect-status
status.storage.replication.factor=1
producer.interceptor.classes=io.debezium.tracing.DebeziumTracingProducerInterceptor
- OTEL_SERVICE_NAME=kafka-connect
- OTEL_TRACES_EXPORTER=otlp
- OTEL_METRICS_EXPORTER=none
- OTEL_EXPORTER_OTLP_ENDPOINT=http://jaeger:4317
- OTEL_TRACES_SAMPLER=always_on
- STRIMZI_TRACING=opentelemetry
command: /opt/kafka/kafka_connect_run.sh
order-service:
image: debezium-examples/outbox-order-service:${DEBEZIUM_VERSION}
build:
context: order-service
dockerfile: src/main/docker/Dockerfile.${QUARKUS_BUILD:-jvm}
ports:
- 8080:8080
links:
- kafka
- order-db
- jaeger
environment:
- QUARKUS_DEBEZIUM_OUTBOX_REMOVE_AFTER_INSERT=true
- QUARKUS_OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=http://jaeger:4317
depends_on:
order-db:
condition: service_healthy
connect:
condition: service_started
kafka:
condition: service_started
jaeger:
condition: service_started
command: "./application -Dquarkus.datasource.jdbc.url=jdbc:postgresql://order-db:5432/orderdb?currentSchema=inventory -Dquarkus.datasource.username=postgresuser -Dquarkus.datasource.password=postgrespw"
shipment-service:
image: debezium-examples/outbox-shipment-service:${DEBEZIUM_VERSION}
build:
context: shipment-service
dockerfile: src/main/docker/Dockerfile.${QUARKUS_BUILD:-jvm}
links:
- kafka
- shipment-db
- jaeger
environment:
- QUARKUS_OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=http://jaeger:4317
depends_on:
shipment-db:
condition: service_healthy
connect:
condition: service_started
kafka:
condition: service_started
jaeger:
condition: service_started