-
Notifications
You must be signed in to change notification settings - Fork 852
/
docker-compose.yaml
193 lines (193 loc) · 5.61 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
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
version: '2.1'
services:
zookeeper:
image: quay.io/debezium/zookeeper:${DEBEZIUM_VERSION}
ports:
- 2181:2181
- 2888:2888
- 3888:3888
networks:
- my-network
kafka:
image: quay.io/debezium/kafka:${DEBEZIUM_VERSION}
ports:
- 9092:9092
links:
- zookeeper
environment:
- ZOOKEEPER_CONNECT=zookeeper:2181
# Set to host IP address when working on the services locally
# - ADVERTISED_HOST_NAME=192.168.1.12
networks:
- my-network
order-db:
image: quay.io/debezium/example-postgres:${DEBEZIUM_VERSION}
ports:
- 5432: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
networks:
- my-network
pgadmin:
container_name: pgadmin_container
image: dpage/pgadmin4
environment:
PGADMIN_DEFAULT_EMAIL: ${PGADMIN_DEFAULT_EMAIL:[email protected]}
PGADMIN_DEFAULT_PASSWORD: ${PGADMIN_DEFAULT_PASSWORD:-admin}
volumes:
- ./servers.json:/pgadmin4/servers.json
ports:
- "${PGADMIN_PORT:-5050}:80"
networks:
- my-network
connect:
image: quay.io/debezium/connect:${DEBEZIUM_VERSION}
ports:
- 8083:8083
- 5005:5005
links:
- kafka
- order-db
environment:
- BOOTSTRAP_SERVERS=kafka:9092
- GROUP_ID=1
- CONFIG_STORAGE_TOPIC=my_connect_configs
- OFFSET_STORAGE_TOPIC=my_connect_offsets
- STATUS_STORAGE_TOPIC=my_connect_statuses
- KAFKA_DEBUG=true
- DEBUG_SUSPEND_FLAG=n
- JAVA_DEBUG_PORT=0.0.0.0:5005
- CONNECT_KEY_CONVERTER=org.apache.kafka.connect.json.JsonConverter
- CONNECT_VALUE_CONVERTER=org.apache.kafka.connect.json.JsonConverter
- CONNECT_KEY_CONVERTER_SCHEMAS_ENABLE=false
- CONNECT_VALUE_CONVERTER_SCHEMAS_ENABLE=false
networks:
- my-network
order-service-nyc:
image: debezium-examples/distributed-caching-order-service:${DEBEZIUM_VERSION}
build:
context: order-service
dockerfile: src/main/docker/Dockerfile.${QUARKUS_BUILD:-jvm}
ports:
- 8080:8080
links:
- kafka
- order-db
environment:
- QUARKUS_DATASOURCE_JDBC_URL=jdbc:postgresql://order-db:5432/orderdb?currentSchema=inventory
- QUARKUS_INFINISPAN_CLIENT_SERVER_LIST=ispn-nyc-1:11222
depends_on:
order-db:
condition: service_healthy
connect:
condition: service_started
networks:
- my-network
command: >
/bin/sh -c "
echo Waiting for Infinispan service start ...;
while ! curl --silent --output /dev/null --fail-early http://ispn-nyc-1:8080;
do
sleep 1;
done;
echo Infinispan service started!;
./deployments/run-java.sh
"
order-service-lon:
image: debezium-examples/distributed-caching-order-service:${DEBEZIUM_VERSION}
build:
context: order-service
dockerfile: src/main/docker/Dockerfile.${QUARKUS_BUILD:-jvm}
ports:
- 8081:8080
links:
- kafka
- order-db
environment:
- QUARKUS_DATASOURCE_JDBC_URL=jdbc:postgresql://order-db:5432/orderdb?currentSchema=inventory
- QUARKUS_INFINISPAN_CLIENT_SERVER_LIST=ispn-lon-1:11222
depends_on:
order-db:
condition: service_healthy
connect:
condition: service_started
networks:
- my-network
command: >
/bin/sh -c "
echo Waiting for Infinispan service start ...;
while ! curl --silent --output /dev/null --fail-early http://ispn-lon-1:8080;
do
sleep 1;
done;
echo Infinispan service started!;
./deployments/run-java.sh
"
cache-update-service:
image: debezium-examples/distributed-caching-cache-update-service:${DEBEZIUM_VERSION}
build:
context: cache-update-service
dockerfile: src/main/docker/Dockerfile.${QUARKUS_BUILD:-jvm}
ports:
- "8082:8082"
links:
- kafka
environment:
- KAFKA_BOOTSTRAP_SERVERS=kafka:9092
- QUARKUS_INFINISPAN_CLIENT_SERVER_LIST=ispn-cen-1:11222
depends_on:
connect:
condition: service_started
networks:
- my-network
command: >
/bin/sh -c "
echo Waiting for Infinispan service start ...;
while ! curl --silent --output /dev/null --fail-early http://ispn-cen-1:8080;
do
sleep 1;
done;
echo Infinispan service started!;
./deployments/run-java.sh -Dquarkus.infinispan-client.server-list=ispn-cen-1:11222
"
infinispan-server-lon-1:
image: quay.io/infinispan/server:13.0
ports:
- "11222:11222"
container_name: ispn-lon-1
networks:
- my-network
volumes:
- ${PWD}:/user-config
command: -b SITE_LOCAL -c /user-config/infinispan-lon.xml -Djgroups.cluster.mcast_addr=228.6.7.10 -Drelay.site=LON
infinispan-server-nyc-1:
image: quay.io/infinispan/server:13.0
ports:
- "31222:11222"
container_name: ispn-nyc-1
networks:
- my-network
volumes:
- ${PWD}:/user-config
command: -b SITE_LOCAL -c /user-config/infinispan-nyc.xml -Djgroups.cluster.mcast_addr=228.6.7.15 -Drelay.site=NYC
infinispan-server-cen-1:
image: quay.io/infinispan/server:13.0
ports:
- "41222:11222"
container_name: ispn-cen-1
networks:
- my-network
volumes:
- ${PWD}:/user-config
command: -b SITE_LOCAL -c /user-config/infinispan-cen.xml -Djgroups.cluster.mcast_addr=228.6.7.20 -Drelay.site=CEN
networks:
my-network:
name: distributed-caching-network