-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
269 lines (252 loc) · 7.47 KB
/
docker-compose.yml
File metadata and controls
269 lines (252 loc) · 7.47 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
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
services:
# Database
leafylane-mysql-db:
image: mysql:8
container_name: leafylane-mysql-db
hostname: leafylane-mysql-db
restart: always
environment:
MYSQL_DATABASE: 'leafylane_db'
MYSQL_USER: 'leafylaneDBA'
MYSQL_PASSWORD: 'PaSSworD'
MYSQL_ROOT_PASSWORD: 'r00tPaSSworD'
ports:
- "3306:3306"
expose:
- "3306"
volumes:
- leafylane-db-volume:/var/lib/mysql
networks:
- leafylane-app-network
# Core services
leafylane-consul-discovery:
hostname: leafylane-consul-discovery
image: hashicorp/consul
container_name: leafylane-consul-discovery
restart: always
ports:
- "8500:8500"
networks:
- leafylane-app-network
leafylane-spring-cloud-api-gateway-server:
build:
context: ./leafylane-api-gateway-service
args:
JAR_FILE: leafylane-api-gateway-service-0.0.1-SNAPSHOT.jar
dockerfile: Dockerfile
image: leafylane-spring-cloud-api-gateway-server
container_name: leafylane-spring-cloud-api-gateway-server
hostname: leafylane-spring-cloud-api-gateway-server
ports:
- "8765:8765"
networks:
- leafylane-app-network
environment:
- SERVER_PORT=8765
- MANAGEMENT_OTLP_TRACING_ENDPOINT=http://leafylane-tempo:4318/v1/traces
- SPRING_PROFILES_ACTIVE=docker
leafylane-auth-server:
build:
context: ./leafylane-oauth2-authorization-server
args:
JAR_FILE: leafylane-oauth2-authorization-server-0.0.1-SNAPSHOT.jar
dockerfile: Dockerfile
image: leafylane-auth-server
container_name: leafylane-auth-server
hostname: leafylane-auth-server
ports:
- "9080:9080"
networks:
- leafylane-app-network
environment:
- SERVER_PORT=9080
- MANAGEMENT_OTLP_TRACING_ENDPOINT=http://leafylane-tempo:4318/v1/traces
- SPRING_PROFILES_ACTIVE=docker
leafylane-account-service:
build:
context: ./leafylane-account-service
args:
JAR_FILE: leafylane-account-service-0.0.1-SNAPSHOT.jar
dockerfile: Dockerfile
image: leafylane-account-service
container_name: leafylane-account-service
hostname: leafylane-account-service
ports:
- "4001:4001"
networks:
- leafylane-app-network
environment:
- SERVER_PORT=4001
- MANAGEMENT_OTLP_TRACING_ENDPOINT=http://leafylane-tempo:4318/v1/traces
- SPRING_PROFILES_ACTIVE=docker
leafylane-billing-service:
build:
context: ./leafylane-address-service
args:
JAR_FILE: leafylane-address-service-0.0.1-SNAPSHOT.jar
dockerfile: Dockerfile
image: leafylane-address-service
container_name: leafylane-address-service
hostname: leafylane-address-service
ports:
- "5001:5001"
networks:
- leafylane-app-network
environment:
- SERVER_PORT=5001
- MANAGEMENT_OTLP_TRACING_ENDPOINT=http://leafylane-tempo:4318/v1/traces
- SPRING_PROFILES_ACTIVE=docker
leafylane-catalog-service:
build:
context: ./leafylane-catalogue-service
args:
JAR_FILE: leafylane-catalogue-service-0.0.1-SNAPSHOT.jar
dockerfile: Dockerfile
image: leafylane-catalogue-service
container_name: leafylane-catalogue-service
hostname: leafylane-catalogue-service
ports:
- "6001:6001"
networks:
- leafylane-app-network
environment:
- SERVER_PORT=6001
- MANAGEMENT_OTLP_TRACING_ENDPOINT=http://leafylane-tempo:4318/v1/traces
- SPRING_PROFILES_ACTIVE=docker
leafylane-order-service:
build:
context: ./leafylane-order-service
args:
JAR_FILE: leafylane-order-service-0.0.1-SNAPSHOT.jar
dockerfile: Dockerfile
image: leafylane-order-service
container_name: leafylane-order-service
hostname: leafylane-order-service
ports:
- "7001:7001"
networks:
- leafylane-app-network
environment:
- SERVER_PORT=7001
- MANAGEMENT_OTLP_TRACING_ENDPOINT=http://leafylane-tempo:4318/v1/traces
- SPRING_PROFILES_ACTIVE=docker
leafylane-payment-service:
build:
context: ./leafylane-payment-service
args:
JAR_FILE: leafylane-payment-service-0.0.1-SNAPSHOT.jar
dockerfile: Dockerfile
image: leafylane-payment-service
container_name: leafylane-payment-service
hostname: leafylane-payment-service
ports:
- "8001:8001"
networks:
- leafylane-app-network
environment:
- SERVER_PORT=8001
- MANAGEMENT_OTLP_TRACING_ENDPOINT=http://leafylane-tempo:4318/v1/traces
- SPRING_PROFILES_ACTIVE=docker
leafylane-notification-service:
build:
context: ./leafylane-notification-service
dockerfile: Dockerfile
image: leafylane-notification-service
container_name: leafylane-notification-service
hostname: leafylane-notification-service
depends_on:
- leafylane-rabbitmq
networks:
- leafylane-app-network
environment:
- EMAIL_SENDER=youremail@gmail.com
- EMAIL_PASSWORD=
- EMAIL_RECIPIENT=otheremail@gmail.com
- RABBITMQ_URL=amqp://user:pass@leafylane-rabbitmq/
ports:
- "9001:9001"
# Monitoring Services
leafylane-prometheus:
build:
context: ./leafylane-prometheus
dockerfile: Dockerfile
image: leafylane-prometheus
container_name: leafylane-prometheus
hostname: leafylane-prometheus
ports:
- "9090:9090"
networks:
- leafylane-app-network
leafylane-tempo:
image: grafana/tempo:latest
container_name: leafylane-tempo
hostname: leafylane-tempo
user: "0"
command: [ "-config.file=/etc/tempo.yaml" ]
volumes:
- ./config/tempo-config.yml:/etc/tempo.yaml
- leafylane-tempo-volume:/tmp/tempo
ports:
- "3200:3200"
- "4317:4317" # OTLP gRPC
- "4318:4318" # OTLP HTTP
networks:
- leafylane-app-network
leafylane-loki:
image: grafana/loki:latest
container_name: leafylane-loki
hostname: leafylane-loki
user: "0"
ports:
- "3100:3100"
command: -config.file=/etc/loki/local-config.yaml
volumes:
- ./config/loki-config.yml:/etc/loki/local-config.yaml
- leafylane-loki-volume:/tmp/loki
networks:
- leafylane-app-network
leafylane-promtail:
image: grafana/promtail:latest
container_name: leafylane-promtail
hostname: leafylane-promtail
volumes:
- /var/lib/docker/containers:/var/lib/docker/containers
- /var/run/docker.sock:/var/run/docker.sock
- ./config/promtail-config.yml:/etc/promtail/config.yml
command: -config.file=/etc/promtail/config.yml
networks:
- leafylane-app-network
leafylane-grafana:
image: grafana/grafana:latest
container_name: leafylane-grafana
hostname: leafylane-grafana
ports:
- "3030:3000"
volumes:
- leafylane-grafana-volume:/var/lib/grafana
- ./config/grafana/provisioning/datasources:/etc/grafana/provisioning/datasources
environment:
- GF_SECURITY_ADMIN_USER=admin
- GF_SECURITY_ADMIN_PASSWORD=admin
networks:
- leafylane-app-network
leafylane-rabbitmq:
image: rabbitmq:3-management
container_name: leafylane-rabbitmq
hostname: leafylane-rabbitmq
ports:
- "5672:5672"
- "15672:15672" # Management UI
environment:
RABBITMQ_DEFAULT_USER: user
RABBITMQ_DEFAULT_PASS: pass
networks:
- leafylane-app-network
volumes:
leafylane-db-volume:
leafylane-grafana-volume:
leafylane-loki-volume:
leafylane-tempo-volume:
networks:
leafylane-app-network:
driver: bridge