-
Notifications
You must be signed in to change notification settings - Fork 5
/
docker-compose.yaml
134 lines (134 loc) · 4.07 KB
/
docker-compose.yaml
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
version: '2.1'
services:
jaeger:
image: jaegertracing/all-in-one:1
ports:
- 6831:6831/udp
- 16686:16686
zookeeper:
image: quay.io/debezium/zookeeper:${DEBEZIUM_VERSION}
ports:
- 2181:2181
- 2888:2888
- 3888:3888
kafka:
image: quay.io/debezium/kafka:${DEBEZIUM_VERSION}
ports:
- 9092:9092
links:
- zookeeper
environment:
- ZOOKEEPER_CONNECT=zookeeper:2181
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
ports:
- 8083:8083
links:
- 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
consumer.interceptor.classes=io.opentracing.contrib.kafka.TracingConsumerInterceptor
producer.interceptor.classes=io.opentracing.contrib.kafka.TracingProducerInterceptor
- JAEGER_SERVICE_NAME=kafka-connect
- JAEGER_AGENT_HOST=jaeger
- JAEGER_SAMPLER_TYPE=const
- JAEGER_SAMPLER_PARAM=1
- STRIMZI_TRACING=jaeger
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
- JAEGER_SERVICE_NAME=order-service
- JAEGER_SAMPLER_TYPE=const
- JAEGER_SAMPLER_PARAM=1
- JAEGER_AGENT_HOST=jaeger
depends_on:
order-db:
condition: service_healthy
connect:
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:
- JAEGER_SERVICE_NAME=shipment-service
- JAEGER_SAMPLER_TYPE=const
- JAEGER_SAMPLER_PARAM=1
- JAEGER_AGENT_HOST=jaeger
depends_on:
shipment-db:
condition: service_healthy
connect:
condition: service_started