-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
256 lines (237 loc) · 5.14 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
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
version: '3'
services:
web:
build:
context: ./
target: web
ports:
- 3000:3000
volumes:
- .:/app
depends_on:
- api
networks:
- network
admin-web:
build:
context: ./
target: admin-web
ports:
- 3002:3000
volumes:
- .:/app
depends_on:
- api
networks:
- network
api:
build:
context: ./
target: api
environment:
- PORT=3333
- REDIS_HOST="cache"
- REDIS_PORT=6379
ports:
- 3333:3333
volumes:
- .:/app
depends_on:
- eventstore
- mongodb
- mongo-express
- cache
- elasticsearch
networks:
- network
booking:
build:
context: ./
target: booking
environment:
- PORT=3333
ports:
- 3334:3333
volumes:
- .:/app
networks:
- network
depends_on:
- kafka
- booking-eventstore
- booking-mongodb
gateway:
build:
context: ./
target: gateway
environment:
- PORT=3000
ports:
- 3335:3000
volumes:
- .:/app
networks:
- network
eventstore:
image: eventstore/eventstore:20.10.2-buster-slim
environment:
- EVENTSTORE_CLUSTER_SIZE=1
- EVENTSTORE_RUN_PROJECTIONS=All
- EVENTSTORE_START_STANDARD_PROJECTIONS=true
- EVENTSTORE_EXT_TCP_PORT=1113
- EVENTSTORE_EXT_HTTP_PORT=2113
- EVENTSTORE_INSECURE=true
- EVENTSTORE_ENABLE_EXTERNAL_TCP=true
- EVENTSTORE_ENABLE_ATOM_PUB_OVER_HTTP=true
volumes:
- type: volume
source: eventstore-volume-data
target: /var/lib/eventstore
- type: volume
source: eventstore-volume-logs
target: /var/log/eventstore
networks:
- network
booking-eventstore:
image: eventstore/eventstore:20.10.2-buster-slim
environment:
- EVENTSTORE_CLUSTER_SIZE=1
- EVENTSTORE_RUN_PROJECTIONS=All
- EVENTSTORE_START_STANDARD_PROJECTIONS=true
- EVENTSTORE_EXT_TCP_PORT=1113
- EVENTSTORE_EXT_HTTP_PORT=2113
- EVENTSTORE_INSECURE=true
- EVENTSTORE_ENABLE_EXTERNAL_TCP=true
- EVENTSTORE_ENABLE_ATOM_PUB_OVER_HTTP=true
volumes:
- type: volume
source: booking-eventstore-volume-data
target: /var/lib/eventstore
- type: volume
source: booking-eventstore-volume-logs
target: /var/log/eventstore
networks:
- network
mongodb:
image: mongo:latest
volumes:
- type: volume
source: mongo-volume-data
target: /data/db
networks:
- network
booking-mongodb:
image: mongo:latest
volumes:
- type: volume
source: mongo-booking-volume-data
target: /data/db
networks:
- network
mongo-express:
image: mongo-express:latest
restart: always
ports:
- 8081:8081
depends_on:
- mongodb
environment:
- ME_CONFIG_MONGODB_SERVER=mongodb
networks:
- network
booking-mongo-express:
image: mongo-express:latest
restart: always
ports:
- 8082:8081
depends_on:
- booking-mongodb
environment:
- ME_CONFIG_MONGODB_SERVER=booking-mongodb
networks:
- network
cache:
image: redis:6.2-alpine
restart: always
ports:
- '6379:6379'
volumes:
- cache:/data
networks:
- network
kafka:
image: docker.io/bitnami/kafka:3.4
ports:
- '9092:9092'
volumes:
- 'kafka-volume-data:/bitnami'
environment:
- KAFKA_CFG_AUTO_CREATE_TOPICS_ENABLE=true
- ALLOW_PLAINTEXT_LISTENER=yes
networks:
- network
grafana:
image: grafana/grafana-oss
restart: unless-stopped
ports:
- '3001:3000'
environment:
GF_INSTALL_PLUGINS: 'grafana-clock-panel,grafana-simple-json-datasource,grafana-worldmap-panel,grafana-piechart-panel'
volumes:
- grafana_data:/var/lib/grafana
networks:
- network
loki:
image: grafana/loki
volumes:
- loki-data:/var/lib/loki
networks:
- network
promtail:
image: grafana/promtail:latest
volumes:
- /var/log:/var/log
command: -config.file=/etc/promtail/config.yml
networks:
- network
elasticsearch:
container_name: elasticsearch
image: docker.elastic.co/elasticsearch/elasticsearch:8.8.0
healthcheck:
test:
[
'CMD-SHELL',
'curl --silent --fail localhost:9200/_cat/health?h=st || exit 1',
]
interval: 50s
timeout: 30s
retries: 5
environment:
- cluster.name=api-cluster
- bootstrap.memory_lock=true
- 'ES_JAVA_OPTS=-Xms512m -Xmx512m'
- discovery.type=single-node
- xpack.security.enabled=false
- http.host=0.0.0.0
- transport.host=0.0.0.0
ports:
- 9300:9300
- 9200:9200
networks:
- network
volumes:
eventstore-volume-data:
eventstore-volume-logs:
booking-eventstore-volume-data:
booking-eventstore-volume-logs:
mongo-volume-data:
mongoclient-volume-data:
mongo-booking-volume-data:
kafka-volume-data:
grafana_data:
loki-data:
cache:
driver: local
networks:
network:
driver: bridge