-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
249 lines (235 loc) · 8.44 KB
/
docker-compose.yml
File metadata and controls
249 lines (235 loc) · 8.44 KB
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
name: Wealth
services:
currency-management:
build:
context: ./CurrencyManagement
dockerfile: ./Dockerfile
environment:
- ASPNETCORE_URLS=http://0.0.0.0:80
- ASPNETCORE_ENVIRONMENT=Development
- ConnectionStrings__CurrencyManagement=Host=postgres;Username=postgres;Password=postgres;Persist Security Info=True;Database=CurrencyManagement;
ports:
- 5000:80
restart: on-failure
depends_on:
postgres:
condition: service_healthy
instrument-management:
build:
context: ./InstrumentManagement
dockerfile: ./Dockerfile
environment:
- ASPNETCORE_URLS=http://0.0.0.0:80
- ASPNETCORE_ENVIRONMENT=Development
- Services__currency__http=currency-management
- ConnectionStrings__InstrumentManagement=Host=postgres;Username=postgres;Password=postgres;Persist Security Info=True;Database=InstrumentManagement;
- ConnectionStrings__Master=Host=postgres;Username=postgres;Password=postgres;Persist Security Info=True;Database=postgres;
- KafkaProducer__BootstrapServers=kafka:9092
ports:
- 5001:80
restart: on-failure
depends_on:
postgres:
condition: service_healthy
portfolio-management:
build:
context: ./PortfolioManagement
dockerfile: ./Dockerfile
environment:
- ASPNETCORE_URLS=http://0.0.0.0:80
- ASPNETCORE_ENVIRONMENT=Development
- Services__currency__http=currency-management
- Services__instrument__http=instrument-management
- ConnectionStrings__PortfolioManagement=Host=postgres;Username=postgres;Password=postgres;Persist Security Info=True;Database=PortfolioManagement;
- KafkaProducer__BootstrapServers=kafka:9092
- KafkaConsumer__BootstrapServers=kafka:9092
ports:
- 5002:80
restart: on-failure
depends_on:
postgres:
condition: service_healthy
portfolio-management-poller:
build:
context: ./OutboxPoller
target: app
dockerfile: ./Dockerfile
command:
- "outbox"
- "-connectionString=postgres://postgres:postgres@postgres/PortfolioManagement?sslmode=disable"
- "-kafka-brokers=kafka"
- "-kafka-topic=wealth-portfolio-management"
- "-period=2000"
restart: on-failure
labels:
com.jetbrains.rider.debug: false
aggregation:
build:
context: ./Aggregation
dockerfile: ./Dockerfile
environment:
- ASPNETCORE_URLS=http://0.0.0.0:80
- ASPNETCORE_ENVIRONMENT=Development
- Services__currency__http=currency-management
- Services__instrument__http=instrument-management
- Services__portfolio__http=portfolio-management
- Services__strategy__http=strategy-tracking
- ConnectionStrings__ClickHouse=Host=clickhouse;Port=9000;Database=default;User=default;Password=default;
- KafkaConsumer__BootstrapServers=kafka
ports:
- 5003:80
restart: on-failure
depends_on:
postgres:
condition: service_healthy
clickhouse:
condition: service_healthy
aggregation-migration:
condition: service_completed_successfully
aggregation-migration:
image: gomicro/goose:3.26.0
volumes:
- ./Aggregation/src/Wealth.Aggregation.Infrastructure/Migrations:/migrations
environment:
GOOSE_DRIVER: clickhouse
GOOSE_DBSTRING: "tcp://default:default@clickhouse:9000"
GOOSE_MIGRATION_DIR: .
command: >
goose up
depends_on:
clickhouse:
condition: service_healthy
deposit-management:
build:
context: ./DepositManagement
dockerfile: ./Dockerfile
environment:
- ASPNETCORE_URLS=http://0.0.0.0:80
- ASPNETCORE_ENVIRONMENT=Development
- Services__currency__http=currency-management
- ConnectionStrings__DepositManagement=Host=postgres;Username=postgres;Password=postgres;Persist Security Info=True;Database=DepositManagement;
ports:
- 5004:80
restart: on-failure
depends_on:
postgres:
condition: service_healthy
wallet-management:
build:
context: ./WalletManagement
dockerfile: ./Dockerfile
environment:
- ASPNETCORE_URLS=http://0.0.0.0:80
- ASPNETCORE_ENVIRONMENT=Development
- Services__currency__http=currency-management
- ConnectionStrings__WalletManagement=Host=postgres;Username=postgres;Password=postgres;Persist Security Info=True;Database=WalletManagement;
ports:
- 5005:80
restart: on-failure
depends_on:
postgres:
condition: service_healthy
strategy-tracking:
build:
context: ./StrategyTracking
dockerfile: ./Dockerfile
environment:
- ASPNETCORE_URLS=http://0.0.0.0:80
- ASPNETCORE_ENVIRONMENT=Development
- Services__currency__http=currency-management
- Services__instrument__http=instrument-management
- ConnectionStrings__StrategyTracking=Host=postgres;Username=postgres;Password=postgres;Persist Security Info=True;Database=StrategyTracking;
ports:
- 5006:80
restart: on-failure
depends_on:
postgres:
condition: service_healthy
kafka:
image: bitnami/kafka:latest
healthcheck:
test: [ "CMD", "kafka-topics.sh", "--bootstrap-server=localhost:9092", "--list" ]
start_period: 15s
interval: 10s
environment:
- KAFKA_ENABLE_KRAFT=yes
- KAFKA_CFG_NODE_ID=1
- KAFKA_CFG_PROCESS_ROLES=controller,broker
- KAFKA_CFG_CONTROLLER_LISTENER_NAMES=CONTROLLER
- KAFKA_CFG_LISTENERS=PLAINTEXT://:9092,CONTROLLER://:9093,EXTERNAL://:29092
- KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP=CONTROLLER:PLAINTEXT,EXTERNAL:PLAINTEXT,PLAINTEXT:PLAINTEXT
- KAFKA_CFG_ADVERTISED_LISTENERS=PLAINTEXT://kafka:9092,EXTERNAL://127.0.0.1:29092
- KAFKA_BROKER_ID=1
- KAFKA_CFG_CONTROLLER_QUORUM_VOTERS=1@127.0.0.1:9093
- ALLOW_PLAINTEXT_LISTENER=YES
- KAFKA_CFG_AUTO_CREATE_TOPICS_ENABLE=true
- KAFKA_CFG_GROUP_INITIAL_REBALANCE_DELAY_MS=1
- KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR=1
ports:
- 9092:9092
- 29092:29092
init-kafka:
image: apache/kafka:latest
working_dir: /opt/kafka/bin/
entrypoint: /bin/bash
depends_on:
kafka:
condition: service_healthy
command:
- -c
- ./kafka-topics.sh --create --if-not-exists --topic "wealth-currency-management" --bootstrap-server kafka:9092 --partitions 1 --replication-factor 1 &&
./kafka-topics.sh --create --if-not-exists --topic "wealth-instrument-prices" --bootstrap-server kafka:9092 --partitions 1 --replication-factor 1 &&
./kafka-topics.sh --create --if-not-exists --topic "wealth-bond-coupons" --bootstrap-server kafka:9092 --partitions 1 --replication-factor 1 &&
./kafka-topics.sh --create --if-not-exists --topic "wealth-stock-dividends" --bootstrap-server kafka:9092 --partitions 1 --replication-factor 1 &&
./kafka-topics.sh --create --if-not-exists --topic "wealth-portfolio-management" --bootstrap-server kafka:9092 --partitions 1 --replication-factor 1 &&
./kafka-topics.sh --create --if-not-exists --topic "wealth-operations" --bootstrap-server kafka:9092 --partitions 1 --replication-factor 1 &&
./kafka-topics.sh --create --if-not-exists --topic "wealth-operations-converted" --bootstrap-server kafka:9092 --partitions 1 --replication-factor 1
akhq:
image: tchiotludo/akhq:0.26.0
environment:
AKHQ_CONFIGURATION: |
akhq:
connections:
docker-kafka-server:
properties:
bootstrap.servers: "kafka:9092"
depends_on:
kafka:
condition: service_healthy
ports:
- 5049:8080
postgres:
image: postgres
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U postgres" ]
interval: 5s
timeout: 5s
retries: 5
ports:
- 5432:5432
clickhouse:
image: clickhouse/clickhouse-server:25.9-alpine
environment:
CLICKHOUSE_DB: default
CLICKHOUSE_USER: default
CLICKHOUSE_PASSWORD: default
healthcheck:
test: ["CMD", "clickhouse-client", "--query", "SELECT 1"]
interval: 10s
timeout: 10s
retries: 3
ports:
- 8123:8123
pgAdmin:
image: dpage/pgadmin4:latest
ports:
- 5050:80
volumes:
- ./servers.json:/pgadmin4/servers.json
environment:
- PGADMIN_DEFAULT_EMAIL=admin@example.com
- PGADMIN_DEFAULT_PASSWORD=postgres
- PGADMIN_CONFIG_SERVER_MODE=False