-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
167 lines (150 loc) · 3.93 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
version: "3.7"
services:
zookeeper:
image: confluentinc/cp-zookeeper:latest
container_name: zookeeper
restart: unless-stopped
environment:
ZOOKEEPER_CLIENT_PORT: 2181
ZOOKEEPER_TICK_TIME: 2000
ports:
- 22181:2181
networks:
- wa2-ecommerce
kafka:
image: confluentinc/cp-kafka:latest
container_name: kafka
restart: unless-stopped
depends_on:
- zookeeper
ports:
- 29092:29092
- 29093:29093
environment:
KAFKA_BROKER_ID: 1
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:9092,PLAINTEXT_HOST://kafka:29093, PLAINTEXT_EXT://kafka:29092
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT,PLAINTEXT_EXT:PLAINTEXT
KAFKA_INTER_BROKER_LISTENER_NAME: PLAINTEXT
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
networks:
- wa2-ecommerce
kafka-connect:
image: debezium/connect:1.6
container_name: kafka-connect
restart: unless-stopped
depends_on:
- kafka
- mysql
ports:
- 8083:8083
environment:
GROUP_ID: 1
CONFIG_STORAGE_TOPIC: my_connect_configs
OFFSET_STORAGE_TOPIC: my_connect_offsets
STATUS_STORAGE_TOPIC: my_connect_statuses
BOOTSTRAP_SERVERS: kafka:9092
networks:
- wa2-ecommerce
mysql:
restart: unless-stopped
image: mysql
container_name: mysql
ports:
- 3306:3306
volumes:
- "./Databases/init.sql:/docker-entrypoint-initdb.d/init.sql"
networks:
- wa2-ecommerce
environment:
MYSQL_ROOT_PASSWORD: admin
mongo:
image: mongo
restart: unless-stopped
container_name: mongo
ports:
- 27017:27017
networks:
- wa2-ecommerce
eureka:
build:
context: ./eureka
dockerfile: Dockerfile
image: wa2-ecommerce-eurekadiscovery
hostname: eurekadiscovery
container_name: eurekadiscovery
restart: unless-stopped
ports:
- 8761:8761
networks:
- wa2-ecommerce
catalog-service:
build:
context: ./CatalogService
dockerfile: Dockerfile
image: wa2-ecommerce-catalog-service
hostname: catalog-service
container_name: catalog-service
restart: unless-stopped
ports:
- 8080:8080
networks:
- wa2-ecommerce
depends_on:
- eureka
- mongo
- mysql
environment:
# Important for clients to register with eureka
- eureka.client.serviceUrl.defaultZone=http://eurekadiscovery:8761/eureka/
warehouse-service:
build:
context: ./WarehouseService
dockerfile: Dockerfile
image: wa2-ecommerce-warehouse-service
hostname: warehouse-service
container_name: warehouse-service
restart: unless-stopped
networks:
- wa2-ecommerce
depends_on:
- eureka
- catalog-service
environment:
# Important for clients to register with eureka
- eureka.client.serviceUrl.defaultZone=http://eurekadiscovery:8761/eureka/
wallet-service:
build:
context: ./WalletService
dockerfile: Dockerfile
image: wa2-ecommerce-wallet-service
hostname: wallet-service
container_name: wallet-service
restart: unless-stopped
networks:
- wa2-ecommerce
depends_on:
- eureka
- catalog-service
environment:
# Important for clients to register with eureka
- eureka.client.serviceUrl.defaultZone=http://eurekadiscovery:8761/eureka/
order-service:
build:
context: ./OrderService
dockerfile: Dockerfile
image: wa2-ecommerce-order-service
hostname: order-service
container_name: order-service
restart: unless-stopped
networks:
- wa2-ecommerce
depends_on:
- eureka
- catalog-service
environment:
# Important for clients to register with eureka
- eureka.client.serviceUrl.defaultZone=http://eurekadiscovery:8761/eureka/
networks:
wa2-ecommerce:
driver: bridge