forked from oscarjb1/introduction-to-software-architecture
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
239 lines (239 loc) · 6.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
services:
mysql:
image: mysql:8
container_name: mysql
command: --authentication_policy=mysql_native_password
env_file:
- .env
ports:
- ${MYSQL_PORT}:3306
networks:
- api-net
volumes:
- mysql:/var/lib/mysql:rw
zipkin:
image: openzipkin/zipkin-slim
container_name: zipkin
ports:
- 9411:9411
networks:
- api-net
ecommerce-app:
image: ecommerce-app
container_name: ecommerce-app
ports:
- 3000:3000
networks:
- api-net
depends_on:
- crm-api
- api-gateway
service-registry:
image: service-registry
container_name: service-registry
environment:
SPRING_APPLICATION_JSON: '{
"eureka.instance.hostname":"service-registry"
}'
networks:
- api-net
ports:
- 8761:8761
api-gateway:
image: api-gateway
container_name: api-gateway
env_file:
- .env
environment:
SPRING_APPLICATION_JSON: '{
"eureka.client.serviceUrl.defaultZone":"${EUREKA_HOST}",
"spring.zipkin.base-url":"${ZIPKIN_HOST}"
}'
networks:
- api-net
ports:
- 8080:8080
depends_on:
- service-registry
security:
image: security
container_name: security
env_file:
- .env
environment:
SPRING_APPLICATION_JSON: '{
"eureka.client.serviceUrl.defaultZone":"${EUREKA_HOST}",
"spring.zipkin.base-url":"${ZIPKIN_HOST}",
"mysql.service.host":"${MYSQL_HOST}",
"mysql.service.port":"${MYSQL_PORT}",
"mysql.service.database":"security",
"mysql.service.username":"root",
"mysql.service.password":"${MYSQL_ROOT_PASSWORD}"
}'
networks:
- api-net
ports:
- 9090:9090
depends_on:
- service-registry
- mysql
- zipkin
rabbitmq:
image: rabbitmq:3.10.6-management
container_name: rabbitmq
networks:
- api-net
ports:
- ${RABBITMQ_PORT}:5672
- 15692:15692
- 15672:15672
crm-api:
image: crm-api
container_name: crm-api
env_file:
- .env
environment:
SPRING_APPLICATION_JSON: '{
"eureka.client.serviceUrl.defaultZone":"${EUREKA_HOST}",
"spring.zipkin.base-url":"${ZIPKIN_HOST}",
"mysql.service.host":"${MYSQL_HOST}",
"mysql.service.port":"${MYSQL_PORT}",
"mysql.service.database":"crm",
"mysql.service.username":"root",
"mysql.service.password":"${MYSQL_PASSWORD}",
"server.port":"8083",
"spring.rabbitmq.host": "${RABBITMQ_HOST}",
"spring.rabbitmq.port": "${RABBITMQ_PORT}",
"spring.rabbitmq.username": "${RABBITMQ_USERNAME}",
"spring.rabbitmq.password": "${RABBITMQ_PASSWORD}",
"spring.rabbitmq.virtual-host": "${RABBITMQ_VIRTUALHOST}"
}'
networks:
- api-net
ports:
- 8083:8083
depends_on:
- service-registry
- rabbitmq
- mysql
- zipkin
mail-sender:
image: mail-sender
container_name: mail-sender
env_file:
- .env
environment:
SPRING_APPLICATION_JSON: '{
"eureka.client.serviceUrl.defaultZone":"${EUREKA_HOST}",
"spring.zipkin.base-url":"${ZIPKIN_HOST}",
"spring.rabbitmq.host": "${RABBITMQ_HOST}",
"spring.rabbitmq.port": "${RABBITMQ_PORT}",
"spring.rabbitmq.username": "${RABBITMQ_USERNAME}",
"spring.rabbitmq.password": "${RABBITMQ_PASSWORD}",
"spring.rabbitmq.virtual-host": "${RABBITMQ_VIRTUALHOST}",
"spring.mail.host":"${EMAIL_HOST}",
"spring.mail.port":"${EMAIL_PORT}",
"spring.mail.username":"${EMAIL_USER}",
"spring.mail.password":"${EMAIL_PASSWORD}",
"spring.mail.properties.mail.smtp.ssl.trust":"${EMAIL_HOST}"
}'
networks:
- api-net
ports:
- 8081:8081
depends_on:
- service-registry
- rabbitmq
- zipkin
webhook-notif:
image: webhook-notif
container_name: webhook-notif
env_file:
- .env
environment:
SPRING_APPLICATION_JSON: '{
"eureka.client.serviceUrl.defaultZone":"${EUREKA_HOST}",
"spring.zipkin.base-url":"${ZIPKIN_HOST}",
"mysql.service.host":"${MYSQL_HOST}",
"mysql.service.port":"${MYSQL_PORT}",
"mysql.service.database":"webhook",
"mysql.service.username":"root",
"mysql.service.password":"${MYSQL_ROOT_PASSWORD}"
}'
networks:
- api-net
ports:
- 9091:9091
depends_on:
- service-registry
- zipkin
- mysql
3pary-app:
image: 3pary-app
container_name: 3pary-app
env_file:
- .env
environment:
SPRING_APPLICATION_JSON: '{
"spring.zipkin.base-url":"${ZIPKIN_HOST}"
}'
networks:
- api-net
ports:
- 9092:9092
depends_on:
- zipkin
ftp-payment-pooling:
image: ftp-payment-pooling
container_name: ftp-payment-pooling
extra_hosts:
- "host.docker.internal:host-gateway"
env_file:
- .env
environment:
SPRING_APPLICATION_JSON: '{
"eureka.client.serviceUrl.defaultZone":"${EUREKA_HOST}",
"spring.zipkin.base-url":"${ZIPKIN_HOST}",
"ftp.enable":"${FTP_ENABLE}",
"ftp.host":"${FTP_HOST}",
"ftp.port":"${FTP_PORT}",
"ftp.user":"${FTP_USERNAME}",
"ftp.password":"${FTP_PASSWORD}"
}'
networks:
- api-net
ports:
- 8082:8082
depends_on:
- service-registry
- crm-api
- zipkin
ftp-server:
image: fauria/vsftpd
container_name: ftp-server
env_file:
- .env
environment:
- FTP_USER=${FTP_USERNAME}
- FTP_PASS=${FTP_PASSWORD}
- PASV_ADDRESS=${FTP_HOST}
- FILE_OPEN_MODE=0777
- PASV_MIN_PORT=21100
- PASV_MAX_PORT=21110
volumes:
- type: bind
source: ./ftp-server/ftp
target: /home/vsftpd
- type: bind
source: ./ftp-server/log
target: /var/log/vsftpd
networks:
- api-net
ports:
- 21:21
- 20:20
- 21100-21110:21100-21110
networks:
api-net:
volumes:
mysql: