forked from microservices-patterns/ftgo-application
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
executable file
·285 lines (271 loc) · 10.4 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
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
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
version: '3'
services:
zookeeper:
image: eventuateio/eventuate-zookeeper:$EVENTUATE_COMMON_VERSION
ports:
- 2181:2181
environment:
ZOOKEEPER_CLIENT_PORT: 2181
KAFKA_HEAP_OPTS: -Xmx64m
kafka:
image: "eventuateio/eventuate-kafka:$EVENTUATE_MESSAGING_KAFKA_IMAGE_VERSION"
ports:
- 9092:9092
depends_on:
- zookeeper
environment:
KAFKA_LISTENERS: LC://kafka:29092,LX://kafka:9092
KAFKA_ADVERTISED_LISTENERS: LC://kafka:29092,LX://${DOCKER_HOST_IP:-localhost}:9092
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: LC:PLAINTEXT,LX:PLAINTEXT
KAFKA_INTER_BROKER_LISTENER_NAME: LC
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
KAFKA_HEAP_OPTS: -Xmx192m
mysql:
build:
context: ./mysql
args:
EVENTUATE_COMMON_VERSION: ${EVENTUATE_COMMON_VERSION?}
EVENTUATE_SAGA_VERSION: ${EVENTUATE_SAGA_VERSION?}
ports:
- 3306:3306
environment:
- MYSQL_ROOT_PASSWORD=rootpassword
- MYSQL_USER=mysqluser
- MYSQL_PASSWORD=mysqlpw
cdc-service:
image: eventuateio/eventuate-cdc-service:$EVENTUATE_CDC_VERSION
ports:
- "8099:8080"
depends_on:
- mysql
- kafka
environment:
EVENTUATELOCAL_KAFKA_BOOTSTRAP_SERVERS: kafka:29092
EVENTUATELOCAL_ZOOKEEPER_CONNECTION_STRING: zookeeper:2181
EVENTUATE_CDC_PIPELINE_PIPELINE1_TYPE: eventuate-tram
EVENTUATE_CDC_PIPELINE_PIPELINE1_READER: reader1
EVENTUATE_CDC_PIPELINE_PIPELINE1_EVENTUATEDATABASESCHEMA: ftgo_consumer_service
EVENTUATE_CDC_PIPELINE_PIPELINE2_TYPE: eventuate-tram
EVENTUATE_CDC_PIPELINE_PIPELINE2_READER: reader1
EVENTUATE_CDC_PIPELINE_PIPELINE2_EVENTUATEDATABASESCHEMA: ftgo_order_service
EVENTUATE_CDC_PIPELINE_PIPELINE3_TYPE: eventuate-tram
EVENTUATE_CDC_PIPELINE_PIPELINE3_READER: reader1
EVENTUATE_CDC_PIPELINE_PIPELINE3_EVENTUATEDATABASESCHEMA: ftgo_kitchen_service
EVENTUATE_CDC_PIPELINE_PIPELINE4_TYPE: eventuate-tram
EVENTUATE_CDC_PIPELINE_PIPELINE4_READER: reader1
EVENTUATE_CDC_PIPELINE_PIPELINE4_EVENTUATEDATABASESCHEMA: ftgo_restaurant_service
EVENTUATE_CDC_PIPELINE_PIPELINE5_TYPE: eventuate-tram
EVENTUATE_CDC_PIPELINE_PIPELINE5_READER: reader1
EVENTUATE_CDC_PIPELINE_PIPELINE5_EVENTUATEDATABASESCHEMA: ftgo_accounting_service
EVENTUATE_CDC_PIPELINE_PIPELINE6_TYPE: eventuate-tram
EVENTUATE_CDC_PIPELINE_PIPELINE6_READER: reader1
EVENTUATE_CDC_PIPELINE_PIPELINE6_EVENTUATEDATABASESCHEMA: ftgoorderhistoryservice
EVENTUATE_CDC_PIPELINE_PIPELINE7_TYPE: eventuate-local
EVENTUATE_CDC_PIPELINE_PIPELINE7_READER: reader1
EVENTUATE_CDC_PIPELINE_PIPELINE7_EVENTUATEDATABASESCHEMA: ftgo_accounting_service
EVENTUATE_CDC_PIPELINE_PIPELINE8_TYPE: eventuate-tram
EVENTUATE_CDC_PIPELINE_PIPELINE8_READER: reader1
EVENTUATE_CDC_PIPELINE_PIPELINE8_EVENTUATEDATABASESCHEMA: ftgo_delivery_service
EVENTUATE_CDC_READER_READER1_TYPE: mysql-binlog
EVENTUATE_CDC_READER_READER1_DATASOURCEURL: jdbc:mysql://mysql:3306/eventuate
EVENTUATE_CDC_READER_READER1_DATASOURCEUSERNAME: root
EVENTUATE_CDC_READER_READER1_DATASOURCEPASSWORD: rootpassword
EVENTUATE_CDC_READER_READER1_DATASOURCEDRIVERCLASSNAME: com.mysql.jdbc.Driver
EVENTUATE_CDC_READER_READER1_LEADERSHIPLOCKPATH: /eventuate/cdc/leader/common
EVENTUATE_CDC_READER_READER1_CDCDBUSERNAME: root
EVENTUATE_CDC_READER_READER1_CDCDBPASSWORD: rootpassword
EVENTUATE_CDC_READER_READER1_READOLDDEBEZIUMDBOFFSETSTORAGETOPIC: "false"
EVENTUATE_CDC_READER_READER1_MYSQLBINLOGCLIENTUNIQUEID: 1
EVENTUATE_CDC_READER_READER1_OFFSETSTOREKEY: MySqlBinlog
EVENTUATE_CDC_READER_READER1_OFFSETSTORAGETOPICNAME: db.history.common
EVENTUATE_CDC_READER_READER1_OUTBOXID: 1
ftgo-consumer-service:
build:
context: ./ftgo-consumer-service
args:
baseImageVersion: ${EVENTUATE_JAVA_BASE_IMAGE_VERSION}
ports:
- "8081:8080"
depends_on:
- mysql
- kafka
- cdc-service
environment:
SPRING_DATASOURCE_URL: jdbc:mysql://mysql/ftgo_consumer_service
SPRING_DATASOURCE_USERNAME: ftgo_consumer_service_user
SPRING_DATASOURCE_PASSWORD: ftgo_consumer_service_password
SPRING_DATASOURCE_DRIVER_CLASS_NAME: com.mysql.jdbc.Driver
EVENTUATELOCAL_KAFKA_BOOTSTRAP_SERVERS: kafka:29092
EVENTUATELOCAL_ZOOKEEPER_CONNECTION_STRING: zookeeper:2181
EVENTUATE_DATABASE_SCHEMA: ftgo_consumer_service
ftgo-order-service:
build:
context: ./ftgo-order-service
args:
baseImageVersion: ${EVENTUATE_JAVA_BASE_IMAGE_VERSION}
ports:
- "8082:8080"
depends_on:
- mysql
- kafka
- cdc-service
- zipkin
environment:
SPRING_DATASOURCE_URL: jdbc:mysql://mysql/ftgo_order_service
SPRING_DATASOURCE_USERNAME: ftgo_order_service_user
SPRING_DATASOURCE_PASSWORD: ftgo_order_service_password
SPRING_DATASOURCE_DRIVER_CLASS_NAME: com.mysql.jdbc.Driver
EVENTUATELOCAL_KAFKA_BOOTSTRAP_SERVERS: kafka:29092
EVENTUATELOCAL_ZOOKEEPER_CONNECTION_STRING: zookeeper:2181
SPRING_SLEUTH_ENABLED: "true"
SPRING_SLEUTH_SAMPLER_PROBABILITY: 1
SPRING_ZIPKIN_BASE_URL: http://zipkin:9411/
EVENTUATE_DATABASE_SCHEMA: ftgo_order_service
ftgo-kitchen-service:
build:
context: ./ftgo-kitchen-service
args:
baseImageVersion: ${EVENTUATE_JAVA_BASE_IMAGE_VERSION}
ports:
- "8083:8080"
depends_on:
- mysql
- kafka
- zookeeper
- cdc-service
environment:
SPRING_DATASOURCE_URL: jdbc:mysql://mysql/ftgo_kitchen_service
SPRING_DATASOURCE_USERNAME: ftgo_kitchen_service_user
SPRING_DATASOURCE_PASSWORD: ftgo_kitchen_service_password
SPRING_DATASOURCE_DRIVER_CLASS_NAME: com.mysql.jdbc.Driver
EVENTUATELOCAL_KAFKA_BOOTSTRAP_SERVERS: kafka:29092
EVENTUATELOCAL_ZOOKEEPER_CONNECTION_STRING: zookeeper:2181
EVENTUATE_DATABASE_SCHEMA: ftgo_kitchen_service
ftgo-restaurant-service:
build:
context: ./ftgo-restaurant-service
args:
baseImageVersion: ${EVENTUATE_JAVA_BASE_IMAGE_VERSION}
ports:
- "8084:8080"
depends_on:
- mysql
- kafka
- zookeeper
- cdc-service
environment:
SPRING_DATASOURCE_URL: jdbc:mysql://mysql/ftgo_restaurant_service
SPRING_DATASOURCE_USERNAME: ftgo_restaurant_service_user
SPRING_DATASOURCE_PASSWORD: ftgo_restaurant_service_password
SPRING_DATASOURCE_DRIVER_CLASS_NAME: com.mysql.jdbc.Driver
EVENTUATELOCAL_KAFKA_BOOTSTRAP_SERVERS: kafka:29092
EVENTUATELOCAL_ZOOKEEPER_CONNECTION_STRING: zookeeper:2181
EVENTUATE_DATABASE_SCHEMA: ftgo_restaurant_service
ftgo-accounting-service:
build:
context: ./ftgo-accounting-service
args:
baseImageVersion: ${EVENTUATE_JAVA_BASE_IMAGE_VERSION}
ports:
- "8085:8080"
depends_on:
- mysql
- kafka
- zookeeper
- cdc-service
environment:
SPRING_DATASOURCE_URL: jdbc:mysql://mysql/ftgo_accounting_service
SPRING_DATASOURCE_USERNAME: ftgo_accounting_service_user
SPRING_DATASOURCE_PASSWORD: ftgo_accounting_service_password
SPRING_DATASOURCE_DRIVER_CLASS_NAME: com.mysql.jdbc.Driver
EVENTUATELOCAL_KAFKA_BOOTSTRAP_SERVERS: kafka:29092
EVENTUATELOCAL_ZOOKEEPER_CONNECTION_STRING: zookeeper:2181
EVENTUATE_DATABASE_SCHEMA: ftgo_accounting_service
ftgo-delivery-service:
build:
context: ./ftgo-delivery-service
args:
baseImageVersion: ${EVENTUATE_JAVA_BASE_IMAGE_VERSION}
ports:
- "8089:8080"
depends_on:
- mysql
- kafka
- cdc-service
- zipkin
environment:
SPRING_DATASOURCE_URL: jdbc:mysql://mysql/ftgo_delivery_service
SPRING_DATASOURCE_USERNAME: ftgo_delivery_service_user
SPRING_DATASOURCE_PASSWORD: ftgo_delivery_service_password
SPRING_DATASOURCE_DRIVER_CLASS_NAME: com.mysql.jdbc.Driver
EVENTUATELOCAL_KAFKA_BOOTSTRAP_SERVERS: kafka:29092
EVENTUATELOCAL_ZOOKEEPER_CONNECTION_STRING: zookeeper:2181
SPRING_SLEUTH_ENABLED: "true"
SPRING_SLEUTH_SAMPLER_PROBABILITY: 1
SPRING_ZIPKIN_BASE_URL: http://zipkin:9411/
EVENTUATE_DATABASE_SCHEMA: ftgo_delivery_service
ftgo-order-history-service:
build:
context: ./ftgo-order-history-service
args:
baseImageVersion: ${EVENTUATE_JAVA_BASE_IMAGE_VERSION}
ports:
- "8086:8080"
depends_on:
- kafka
- zookeeper
- cdc-service
- dynamodblocal
- dynamodblocal-init
environment:
EVENTUATELOCAL_KAFKA_BOOTSTRAP_SERVERS: kafka:29092
EVENTUATELOCAL_ZOOKEEPER_CONNECTION_STRING: zookeeper:2181
AWS_ACCESS_KEY_ID: ${AWS_ACCESS_KEY_ID:-id_key}
AWS_SECRET_ACCESS_KEY: ${AWS_SECRET_ACCESS_KEY:-access_key}
AWS_DYNAMODB_ENDPOINT_URL: http://dynamodblocal:8000
AWS_REGION: ${AWS_REGION:-us-west-2}
ftgo-api-gateway:
build:
context: ./ftgo-api-gateway
args:
baseImageVersion: ${EVENTUATE_JAVA_BASE_IMAGE_VERSION}
ports:
- "8087:8080"
environment:
ORDER_DESTINATIONS_ORDERSERVICEURL: http://ftgo-order-service:8080
ORDER_DESTINATIONS_ORDERHISTORYSERVICEURL: http://ftgo-order-history-service:8080
CONSUMER_DESTINATIONS_CONSUMERSERVICEURL: http://ftgo-consumer-service:8080
SPRING_SLEUTH_ENABLED: "true"
SPRING_SLEUTH_SAMPLER_PROBABILITY: 1
SPRING_ZIPKIN_BASE_URL: http://zipkin:9411/
zipkin:
image: openzipkin/zipkin:2.21
ports:
- "9411:9411"
environment:
JAVA_OPTS: -Xmx128m
dynamodblocal:
build: ./dynamodblocal
ports:
- "8000:8000"
environment:
JAVA_OPTS: -Xmx128m
dynamodblocal-init:
build: ./dynamodblocal-init
depends_on:
- dynamodblocal
restart: on-failure
environment:
AWS_DYNAMODB_ENDPOINT_URL: http://dynamodblocal:8000
AWS_ACCESS_KEY_ID: ${AWS_ACCESS_KEY_ID:-id_key}
AWS_SECRET_ACCESS_KEY: ${AWS_SECRET_ACCESS_KEY:-access_key}
AWS_REGION: ${AWS_REGION:-us-west-2}
kafka-gui:
image: quay.io/cloudhut/kowl:master-1d07695
ports:
- 9088:8080
depends_on:
- kafka
environment:
KAFKA_BROKERS: kafka:29092