-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
230 lines (218 loc) · 6.03 KB
/
docker-compose.yml
File metadata and controls
230 lines (218 loc) · 6.03 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
services:
zookeeper:
image: bitnami/zookeeper:3.8
container_name: zookeeper
hostname: zookeeper
ports:
- "2181:2181"
environment:
- ALLOW_ANONYMOUS_LOGIN=yes
- ZOO_MY_ID=1
platform: linux/arm64/v8
kafka:
image: bitnami/kafka:3.5
container_name: kafka
hostname: kafka
ports:
- "9092:9092"
depends_on:
- zookeeper
healthcheck:
test: ["CMD", "kafka-topics.sh", "--bootstrap-server", "localhost:9092", "--list"]
interval: 10s
timeout: 5s
retries: 5
environment:
- KAFKA_BROKER_ID=1
- KAFKA_CFG_ZOOKEEPER_CONNECT=zookeeper:2181
- KAFKA_CFG_ADVERTISED_LISTENERS=PLAINTEXT://kafka:29092,EXTERNAL://localhost:9092
- KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP=PLAINTEXT:PLAINTEXT,EXTERNAL:PLAINTEXT
- KAFKA_CFG_LISTENERS=PLAINTEXT://:29092,EXTERNAL://:9092
- ALLOW_PLAINTEXT_LISTENER=yes
platform: linux/arm64/v8
accounts-db:
image: postgres:15
container_name: accounts-db
ports:
- "5432:5432"
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=your_password
- POSTGRES_DB=accountsdb
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres -d accountsdb && PGPASSWORD=your_password psql -U postgres -d accountsdb -c 'SELECT 1 FROM user_account'"]
interval: 10s
timeout: 5s
retries: 5
volumes:
- accounts-data:/var/lib/postgresql/data
- ./accounts_service/postgres/init.sql:/docker-entrypoint-initdb.d/init.sql
env_file:
- .env
platform: linux/amd64
accounts-service:
build:
context: ./accounts_service
dockerfile: Dockerfile
container_name: accounts-service
ports:
- "5002:5000"
depends_on:
accounts-db:
condition: service_healthy
env_file:
- .env
environment:
DB_HOST: accounts-db
DB_NAME: accountsdb
DB_USER: postgres
DB_PASSWORD: your_password
platform: linux/arm64/v8
auth-service:
build:
context: ./auth_service
dockerfile: Dockerfile
container_name: auth-service
ports:
- "5004:5002"
depends_on:
accounts-db:
condition: service_healthy
env_file:
- .env
environment:
DB_HOST: accounts-db
DB_NAME: accountsdb
DB_USER: postgres
DB_PASSWORD: your_password
platform: linux/arm64/v8
mssql:
build:
context: ./transaction_service/mssql
dockerfile: Dockerfile
container_name: mssql
ports:
- "1433:1433"
environment:
- SA_PASSWORD=YourStrong@Password!
- ACCEPT_EULA=Y
platform: linux/amd64
healthcheck:
test: ["CMD-SHELL", "/opt/mssql-tools/bin/sqlcmd -S localhost -U SA -P \"YourStrong@Password!\" -Q \"SELECT 1 FROM sys.databases WHERE name='RelibankDB'\" || exit 1"]
interval: 10s
timeout: 5s
retries: 5
env_file:
- .env
volumes:
- mssql-data:/var/opt/mssql
mssql-init:
image: mcr.microsoft.com/mssql/server:2019-CU18-ubuntu-20.04
container_name: mssql-init
platform: linux/amd64
depends_on:
mssql:
condition: service_healthy
command: /opt/mssql-tools/bin/sqlcmd -S mssql -U SA -P "YourStrong@Password!" -i /usr/config/init.sql
env_file:
- .env
volumes:
- ./transaction_service/mssql/init.sql:/usr/config/init.sql
bill-pay:
build:
context: ./bill_pay
container_name: bill-pay-service
ports:
- "5000:5000"
depends_on:
kafka:
condition: service_healthy
transaction-service:
condition: service_healthy
# command: ["sh", "-c", "uvicorn bill_pay_service:app --host 0.0.0.0 --port 5000 --workers 1 --log-level error"]
environment:
KAFKA_BROKER: kafka:29092
TRANSACTION_SERVICE_URL: http://transaction-service:5001
env_file:
- .env
platform: linux/arm64/v8
transaction-service:
build:
context: ./transaction_service
dockerfile: Dockerfile
container_name: transaction-service
ports:
- "5001:5000"
depends_on:
kafka:
condition: service_healthy
mssql-init:
condition: service_completed_successfully
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:5000/health"]
interval: 10s
timeout: 5s
retries: 5
# command: ["sh", "-c", "uvicorn transaction_service:app --host 0.0.0.0 --port 5000 --workers 1 --log-level error"]
env_file:
- .env
environment:
KAFKA_BROKER: kafka:29092
DB_SERVER: mssql
DB_DATABASE: RelibankDB
DB_USERNAME: SA
DB_PASSWORD: YourStrong@Password!
platform: linux/arm64/v8
notifications-service:
build:
context: ./notifications_service
dockerfile: Dockerfile
container_name: notifications-service
depends_on:
kafka:
condition: service_healthy
# command: ["python", "notifications_service.py"]
env_file:
- .env
environment:
KAFKA_BROKER: kafka:29092
AZURE_ACS_CONNECTION_STRING: ""
AZURE_ACS_SMS_PHONE_NUMBER: "+15551234567"
AZURE_ACS_EMAIL_ENDPOINT: "https://your-acs-resource-name.azurecomm.net"
AZURE_ACS_EMAIL_SENDER: "DoNotReply@xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.azurecomm.net"
platform: linux/arm64/v8
scheduler-service:
build:
context: ./scheduler_service
dockerfile: Dockerfile
container_name: scheduler-service
depends_on:
kafka:
condition: service_healthy
mssql-init:
condition: service_completed_successfully
# command: ["python", "scheduler_service.py"]
env_file:
- .env
environment:
KAFKA_BROKER: kafka:29092
DB_SERVER: mssql
DB_DATABASE: RelibankDB
DB_USERNAME: SA
DB_PASSWORD: YourStrong@Password!
platform: linux/arm64/v8
chatbot-service:
build:
context: ./chatbot_service
container_name: chatbot-service
ports:
- "5003:5003"
depends_on:
- kafka
env_file:
- .env
environment:
KAFKA_BROKER: kafka:29092
volumes:
mssql-data:
accounts-data: