-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
196 lines (183 loc) · 4.44 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
version: "3.7"
services:
kafka:
container_name: "kafka"
image: "bitnami/kafka:3.4.0"
restart: on-failure
volumes:
- kafka:/bitnami/kafka
networks:
- global
ports:
- "2182:2182"
- "9092:9092"
environment:
- KAFKA_ENABLE_KRAFT=yes
- KAFKA_KRAFT_CLUSTER_ID=GzYIE-nqTIWjIGHQyPPWYQ
- KAFKA_CFG_PROCESS_ROLES=broker,controller
- KAFKA_CFG_CONTROLLER_LISTENER_NAMES=CONTROLLER
- KAFKA_CFG_LISTENERS=PLAINTEXT://:9092,CONTROLLER://:9093,DOCKER_EXTERNAL://:2182
- KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP=CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXT,DOCKER_EXTERNAL:PLAINTEXT
- KAFKA_CFG_ADVERTISED_LISTENERS=PLAINTEXT://kafka:9092, DOCKER_EXTERNAL://${DOCKER_HOST_IP:-127.0.0.1}:2182
- KAFKA_CFG_CONTROLLER_QUORUM_VOTERS=1@kafka:9093
- KAFKA_CFG_NODE_ID=1
- KAFKA_BROKER_ID=1
- ALLOW_PLAINTEXT_LISTENER=yes
- HOST_HOSTNAME="localhost"
kafka_ui:
container_name: "kafka_ui"
image: "provectuslabs/kafka-ui:v0.6.2"
restart: on-failure
volumes:
- kafka:/bitnami/kafka
networks:
- global
ports:
- "9000:8080"
environment:
- KAFKA_CLUSTERS_0_NAME=kraft
- KAFKA_CLUSTERS_0_BOOTSTRAP_SERVERS=kafka:9092
depends_on:
- kafka
cassandra:
container_name: "cassandra"
image: "cassandra:4.1.0"
restart: on-failure
volumes:
- cassandra_db:/var/lib/cassandra
networks:
- global
ports:
- "9042:9042"
environment:
- CASSANDRA_CLUSTER_NAME=petswave
- HEAP_NEWSIZE=128M
- MAX_HEAP_SIZE=1024M
postgres:
container_name: "postgres"
image: "postgres:15.2"
restart: on-failure
volumes:
- postgres_db:/var/lib/postgresql/data
networks:
- global
ports:
- "5433:5432"
environment:
- POSTGRES_USER=user
- POSTGRES_PASSWORD=Pa55word
- POSTGRES_DB=petswave
gateway:
container_name: "gateway"
build:
context: ./gateway
restart: on-failure
networks:
- global
ports:
- "8080:8080"
environment:
- eureka.client.service-url.defaultZone=http://discovery:8083/eureka
links:
- discovery
depends_on:
- discovery
discovery:
container_name: "discovery"
build:
context: ./discovery-service
restart: on-failure
networks:
- global
ports:
- "8083:8083"
environment:
- eureka.client.service-url.defaultZone=http://discovery:8083/eureka
query-service:
container_name: "query-service"
build:
context: ./query-service
restart: on-failure
networks:
- global
ports:
- "8089:8089"
environment:
- eureka.client.service-url.defaultZone=http://discovery:8083/eureka
- spring.r2dbc.url=r2dbc:postgresql://postgres:5432/petswave
- spring.r2dbc.hostname=postgres
- spring.r2dbc.port=5432
depends_on:
- discovery
- gateway
- postgres
data-publisher:
container_name: "data-publisher"
build:
context: ./data-publisher
restart: on-failure
networks:
- global
ports:
- "8087:8087"
environment:
- eureka.client.service-url.defaultZone=http://discovery:8083/eureka
- spring.kafka.bootstrap-servers=http://kafka:9092
- spring.cassandra.contact-points=cassandra
depends_on:
- discovery
- gateway
- cassandra
- kafka
data-projector:
container_name: "data-projector"
build:
context: ./data-projector
restart: on-failure
networks:
- global
ports:
- "8088:8088"
environment:
- eureka.client.service-url.defaultZone=http://discovery:8083/eureka
- spring.kafka.bootstrap-servers=http://kafka:9092
- spring.r2dbc.url=r2dbc:postgresql://postgres:5432/petswave
- spring.r2dbc.hostname=postgres
- spring.r2dbc.port=5432
depends_on:
- discovery
- gateway
- postgres
- kafka
frontend:
container_name: "frontend"
build:
context: ./frontend
restart: on-failure
networks:
- global
ports:
- "80:4200"
depends_on:
- discovery
- query-service
- data-projector
- data-publisher
- gateway
- postgres
- cassandra
- kafka
volumes:
consul:
driver: local
kafka:
driver: local
cassandra_db:
driver: local
postgres_db:
driver: local
cache:
driver: local
networks:
global:
driver: bridge