-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.override.yml
312 lines (290 loc) · 8.85 KB
/
docker-compose.override.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
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
version: '3.5'
services:
# ============= ZETA SERVICES ======================================================================================================
# ===================================================================================================================================
apigateway.presentation.web:
container_name: zeta_presentation_apigateway
environment:
- ASPNETCORE_ENVIRONMENT=Development
- ASPNETCORE_URLS=https://+:443;http://+:80
- ASPNETCORE_HTTPS_PORT=6100
restart: unless-stopped
ports:
- 6000:80
- 6100:443
# healthcheck:
# test: ["CMD", "curl", "-sS", "http://127.0.0.1"]
# test: curl -sS http://127.0.0.1 || exit 1
volumes:
- ${APPDATA}/Microsoft/UserSecrets:/root/.microsoft/usersecrets:ro
- ${APPDATA}/ASP.NET/Https:/root/.aspnet/https:ro
networks:
- zeta
customers.presentation.web:
container_name: zeta_presentation_customers
environment:
- ASPNETCORE_ENVIRONMENT=Development
- ASPNETCORE_URLS=http://0.0.0.0:80
restart: unless-stopped
# healthcheck:
# test: ["CMD", "curl", "-f", "http://localhost/health"]
ports:
- 6001:80 # The API Gateway redirects and access through the internal port (80)
# In a production environment the external port (5002) should be removed, kept here for microservice debugging purposes
networks:
- zeta
orders.presentation.web:
container_name: zeta_presentation_orders
environment:
- ASPNETCORE_ENVIRONMENT=Development
- ASPNETCORE_URLS=http://0.0.0.0:80
restart: unless-stopped
# healthcheck:
# test: ["CMD", "curl", "-f", "http://localhost/health"]
ports:
- 6002:80 # The API Gateway redirects and access through the internal port (80)
# In a production environment the external port (5006) should be removed, kept here for microservice debugging purposes
networks:
- zeta
# ============= INFRASTRUCTURE ======================================================================================================
# ===================================================================================================================================
# portainer:
# image: portainer/portainer
# container_name: portainer
# restart: always
# ports:
# - 9000:9000 # http://localhost:9000
# networks:
# - zeta
# volumes:
# - /var/run/docker.sock:/var/run/docker.sock
# - portainer:/data portainer/portainer
mssql:
image: mcr.microsoft.com/mssql/server
container_name: zeta_mssql
restart: unless-stopped
environment:
- ACCEPT_EULA=Y
- SA_PASSWORD=Abcd1234! # Server=mssql;Database=sample;User=sa;Password=Abcd1234!;Trusted_Connection=False;MultipleActiveResultSets=True;
- MSSQL_PID=Developer
healthcheck:
test: /opt/mssql-tools/bin/sqlcmd -S mssql -U SA -P 'Abcd1234!' -Q 'select 1'
ports:
- 14339:1433
volumes:
- mssql:/var/opt/mssql
networks:
- zeta
mssqlscripts:
image: mcr.microsoft.com/mssql-tools
container_name: zeta_mssqlscripts
depends_on:
- mssql
command: /bin/bash -c 'until /opt/mssql-tools/bin/sqlcmd -S mssql -U sa -P "Abcd1234!" -Q "create database zeta_keycloak"; do sleep 5; done'
networks:
- zeta
mongo:
image: mongo:latest
container_name: zeta_mongo # mongodb://mongo:27017,db2.example.net:2500/?connectTimeoutMS=300000
restart: unless-stopped
hostname: mongodb
ports:
- 27017:27017
healthcheck:
# initiate the replica set https://zgadzaj.com/development/docker/docker-compose/turning-standalone-mongodb-server-into-a-replica-set-with-docker-compose
test: test $$(echo "rs.initiate().ok || rs.status().ok" | mongo --quiet) -eq 1
interval: 10s
start_period: 30s
# healthcheck:
# test: echo 'db.runCommand("ping").ok' | mongo mongo:27017/test --quiet 1
# interval: 10s
# timeout: 10s
# retries: 5
# start_period: 20s
entrypoint: [ "/usr/bin/mongod", "--bind_ip_all", "--replSet", "rs0" ]
volumes:
- mongo:/data/db
networks:
- zeta
mongo-express:
image: mongo-express:latest
container_name: zeta_mongo-express
depends_on:
- mongo
restart: unless-stopped
ports:
- 8081:8081 # http://localhost:8081/
networks:
- zeta
eventstore:
image: eventstore/eventstore
container_name: zeta_eventstore
restart: unless-stopped
environment:
- EVENTSTORE_RUN_PROJECTIONS=All
- EVENTSTORE_START_STANDARD_PROJECTIONS=true
ports:
- 2113:2113 # http://localhost:2113/ admin/changeit
- 1113:1113
networks:
- zeta
rabbitmq:
image: rabbitmq:3-management
container_name: zeta_rabbitmq
restart: unless-stopped
ports:
- 5672:5672
- 15672:15672 # http://localhost:15672
# volumes:
# - rabbitmq:/var/lib/rabbitmq
networks:
- zeta
jaeger:
image: jaegertracing/all-in-one
container_name: zeta_jaeger
restart: unless-stopped
ports:
- 5775:5775/udp
- 5778:5778
- 6831:6831/udp
- 6832:6832/udp
# - 9411:9411
- 14268:14268
- 16686:16686 # http://localhost:16686/search
networks:
- zeta
zipkin:
image: openzipkin/zipkin
container_name: zeta_zipkin
restart: unless-stopped
environment:
- STORAGE_TYPE=mem # more here https://github.com/openzipkin-attic/docker-zipkin mysql: https://www.linode.com/docs/uptime/analytics/zipkin-server-configuration-using-docker-and-mysql/
# Uncomment to disable scribe
# - SCRIBE_ENABLED=false
# Uncomment to enable self-tracing
# - SELF_TRACING_ENABLED=true
# Uncomment to enable debug logging
# - JAVA_OPTS=-Dlogging.level.zipkin=DEBUG
healthcheck:
test: wget -O health.json http://127.0.0.1:9411/health || exit 1
ports:
- 9411:9411 # http://localhost:9411/zipkin/
networks:
- zeta
keycloak:
image: jboss/keycloak
container_name: zeta_keycloak
restart: unless-stopped
depends_on:
- mssql
- mssqlscripts
ports:
- 8080:8080 # http://localhost:8080 (admin/admin)
volumes:
- ./tools/imports:/opt/jboss/keycloak/imports
command:
- "-b 0.0.0.0 -Dkeycloak.migration.action=import -Dkeycloak.migration.provider=singleFile -Dkeycloak.migration.file=/opt/jboss/keycloak/imports/keycloak-realm-export.json -Dkeycloak.migration.strategy=OVERWRITE_EXISTING -Dkeycloak.profile.feature.upload_scripts=enabled"
environment:
- KEYCLOAK_USER=admin
- KEYCLOAK_PASSWORD=admin
- DB_VENDOR=mssql # https://github.com/keycloak/keycloak-containers/tree/master/docker-compose-examples
- DB_USER=sa
- DB_PASSWORD=Abcd1234!
- DB_ADDR=mssql
- DB_DATABASE=zeta_keycloak
networks:
- zeta
seq:
image: datalust/seq:latest
container_name: zeta_seq
restart: unless-stopped
ports:
- 5340:80 # http://localhost:5340
environment:
- ACCEPT_EULA=Y
volumes:
- seq:/data
networks:
- zeta
consul:
image: consul:latest
container_name: zeta_consul # clustered: https://github.com/hashicorp/consul/blob/master/demo/docker-compose-cluster/docker-compose.yml
ports:
- 8500:8500 # http://localhost:8500/ui
- 8300:8300
volumes:
- consul:/consul/conf
- consul:/consul/data
# - ./.consul/config:/consul/conf
# - ./.consul/data:/consul/data
command: agent -server -data-dir=/consul/data -bind 0.0.0.0 -client 0.0.0.0 -bootstrap-expect=1 -ui
environment:
- CONSUL_DISABLE_PERM_MGMT= -u consul
networks:
- zeta
# fabio:
# image: fabiolb/fabio
# container_name: fabio
# restart: unless-stopped
# environment:
# - FABIO_REGISTRY_CONSUL_ADDR=consul:8500
# networks:
# - zeta
# ports:
# - 9998:9998
# - 9999:9999
# vault:
# image: vault
# container_name: vault
# restart: unless-stopped
# ports:
# - 8200:8200 # http://localhost:8200
# networks:
# - zeta
# environment:
# - VAULT_ADDR=http://127.0.0.1:8200
# - VAULT_DEV_ROOT_TOKEN_ID=secret
# cap_add:
# - IPC_LOCK
# redis:
# image: redis
# container_name: redis
# restart: unless-stopped
# ports:
# - 6379:6379
# networks:
# - zeta
# volumes:
# - redis:/data
# grafana:
# image: grafana/grafana
# container_name: grafana
# restart: unless-stopped
# ports:
# - 3000:3000
# networks:
# - zeta
# # volumes:
# # - grafana:/var/lib/grafana
volumes:
mssql:
name: zeta_mssql
driver: local
mongo:
name: zeta_mongo
driver: local
rabbitmq:
name: zeta_rabbitmq
driver: local
consul:
name: zeta_consul
driver: local
seq:
name: zeta_seq
driver: local
# portainer:
# driver: local
networks:
zeta:
name: zeta
driver: bridge