forked from microservices-patterns/ftgo-application
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
executable file
·259 lines (247 loc) · 9.72 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
version: '3'
services:
zookeeper:
image: eventuateio/eventuate-zookeeper:0.4.0.RELEASE
ports:
- 2181:2181
kafka:
image: eventuateio/eventuate-kafka:0.3.0.RELEASE
ports:
- 9092:9092
depends_on:
- zookeeper
environment:
- ADVERTISED_HOST_NAME=${DOCKER_HOST_IP?DOCKER_HOST_IP must be set}
- KAFKA_HEAP_OPTS=-Xmx192m -Xms192m
- ZOOKEEPER_SERVERS=zookeeper:2181
mysql:
build: ./mysql
ports:
- 3306:3306
environment:
- MYSQL_ROOT_PASSWORD=rootpassword
- MYSQL_USER=mysqluser
- MYSQL_PASSWORD=mysqlpw
cdc-service:
image: eventuateio/eventuate-cdc-service:0.6.0.RC3
ports:
- "8099:8080"
depends_on:
- mysql
- kafka
environment:
EVENTUATELOCAL_KAFKA_BOOTSTRAP_SERVERS: kafka:9092
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
ftgo-consumer-service:
build: ./ftgo-consumer-service
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:9092
EVENTUATELOCAL_ZOOKEEPER_CONNECTION_STRING: zookeeper:2181
EVENTUATE_DATABASE_SCHEMA: ftgo_consumer_service
JAVA_OPTS: -Xmx192m
ftgo-order-service:
build: ./ftgo-order-service
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:9092
EVENTUATELOCAL_ZOOKEEPER_CONNECTION_STRING: zookeeper:2181
JAVA_OPTS: -Xmx192m
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: ./ftgo-kitchen-service
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:9092
EVENTUATELOCAL_ZOOKEEPER_CONNECTION_STRING: zookeeper:2181
JAVA_OPTS: -Xmx192m
EVENTUATE_DATABASE_SCHEMA: ftgo_kitchen_service
SPRING_SLEUTH_ENABLED: "true"
SPRING_SLEUTH_SAMPLER_PROBABILITY: 1
SPRING_ZIPKIN_BASE_URL: http://zipkin:9411/
ftgo-restaurant-service:
build: ./ftgo-restaurant-service
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:9092
EVENTUATELOCAL_ZOOKEEPER_CONNECTION_STRING: zookeeper:2181
JAVA_OPTS: -Xmx192m
EVENTUATE_DATABASE_SCHEMA: ftgo_restaurant_service
SPRING_SLEUTH_ENABLED: "true"
SPRING_SLEUTH_SAMPLER_PROBABILITY: 1
SPRING_ZIPKIN_BASE_URL: http://zipkin:9411/
ftgo-accounting-service:
build: ./ftgo-accounting-service
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:9092
EVENTUATELOCAL_ZOOKEEPER_CONNECTION_STRING: zookeeper:2181
JAVA_OPTS: -Xmx192m
EVENTUATE_DATABASE_SCHEMA: ftgo_accounting_service
SPRING_SLEUTH_ENABLED: "true"
SPRING_SLEUTH_SAMPLER_PROBABILITY: 1
SPRING_ZIPKIN_BASE_URL: http://zipkin:9411/
ftgo-delivery-service:
build: ./ftgo-delivery-service
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:9092
EVENTUATELOCAL_ZOOKEEPER_CONNECTION_STRING: zookeeper:2181
JAVA_OPTS: -Xmx192m
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: ./ftgo-order-history-service
ports:
- "8086:8080"
depends_on:
- kafka
- zookeeper
- cdc-service
- dynamodblocal
- dynamodblocal-init
environment:
EVENTUATELOCAL_KAFKA_BOOTSTRAP_SERVERS: kafka:9092
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}
JAVA_OPTS: -Xmx192m
SPRING_SLEUTH_ENABLED: "true"
SPRING_SLEUTH_SAMPLER_PROBABILITY: 1
SPRING_ZIPKIN_BASE_URL: http://zipkin:9411/
ftgo-api-gateway:
build: ./ftgo-api-gateway
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
JAVA_OPTS: -Xmx192m
SPRING_SLEUTH_ENABLED: "true"
SPRING_SLEUTH_SAMPLER_PROBABILITY: 1
SPRING_ZIPKIN_BASE_URL: http://zipkin:9411/
zipkin:
image: openzipkin/zipkin:2.5.0
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}