-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
227 lines (211 loc) · 4.92 KB
/
Copy pathdocker-compose.yml
File metadata and controls
227 lines (211 loc) · 4.92 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
version: '3.8'
networks:
consul-net:
driver: bridge
volumes:
vault_data:
services:
zookeeper:
image: wurstmeister/zookeeper
container_name: zookeeper
restart: "no"
depends_on:
- consul
ports:
- "2181:2181"
networks:
- consul-net
kafka:
image: wurstmeister/kafka
container_name: kafka
restart: "no"
ports:
- "9092:9092"
environment:
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
KAFKA_LISTENERS: PLAINTEXT://0.0.0.0:9092,PLAINTEXT_INTERNAL://0.0.0.0:29092
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://localhost:9092,PLAINTEXT_INTERNAL://kafka:29092
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_INTERNAL:PLAINTEXT
KAFKA_INTER_BROKER_LISTENER_NAME: PLAINTEXT_INTERNAL
KAFKA_AUTO_CREATE_TOPICS_ENABLE: "false"
depends_on:
- consul
- zookeeper
networks:
- consul-net
kafdrop:
image: obsidiandynamics/kafdrop
container_name: kafdrop
restart: "no"
ports:
- "9000:9000"
environment:
KAFKA_BROKERCONNECT: "kafka:29092"
depends_on:
- consul
- "kafka"
networks:
- consul-net
gateway:
container_name: gateway
build: ./gateway
ports:
- '8080:8080'
depends_on:
- consul
networks:
- consul-net
email-service:
container_name: email-service
volumes:
- ./logs:/app/logs
build: email-service
environment:
- OTEL_EXPORTER_OTLP_ENDPOINT=http://jaeger:4317
- OTEL_SERVICE_NAME=email-service
- OTEL_TRACES_EXPORTER=otlp
- OTEL_EXPORTER_JAEGER_ENABLED=false
depends_on:
- kafka
- consul
- vault
- jaeger
ports:
- 45292:45292
networks:
- consul-net
jaeger:
image: jaegertracing/all-in-one:1.48
container_name: jaeger
ports:
- "16686:16686" # Web UI
- "4317:4317" # OTLP gRPC
environment:
- COLLECTOR_OTLP_ENABLED=true
networks:
- consul-net
security-service:
container_name: security-service
env_file: ./security-service/src/main/resources/application.env
build: ./security-service
environment:
- OTEL_EXPORTER_OTLP_ENDPOINT=http://jaeger:4317
- OTEL_SERVICE_NAME=security-service
- OTEL_TRACES_EXPORTER=otlp
- OTEL_EXPORTER_JAEGER_ENABLED=false
ports:
- '8765:8765'
depends_on:
- kafka
- consul
- usersDB
- jaeger
networks:
- consul-net
usersDB:
image: postgres:alpine
container_name: usersDB
hostname: usersDB
ports:
- '5430:5430'
environment:
POSTGRES_DB: usersDB
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
PGDATA: /data/postgres
volumes:
- ./usersDB:/data
networks:
- consul-net
profile-service:
container_name: profile-service
build: profile-service
environment:
- OTEL_EXPORTER_OTLP_ENDPOINT=http://jaeger:4317
- OTEL_SERVICE_NAME=profile-service
- OTEL_TRACES_EXPORTER=otlp
- OTEL_EXPORTER_JAEGER_ENABLED=false
depends_on:
- profileDb
- kafka
- consul
- jaeger
ports:
- 45291:45291
networks:
- consul-net
profileDb:
image: postgres:alpine
restart: unless-stopped
hostname: profileDb
container_name: profileDb
ports:
- 5431:5431
environment:
POSTGRES_DB: profileDb
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
PGDATA: /data/postgres
volumes:
- ./profileDb:/data
networks:
- consul-net
file-storage-service:
container_name: file-storage-service
build: file-storage-service
depends_on:
- fileStorageDb
- consul
- vault
- jaeger
environment:
- OTEL_EXPORTER_OTLP_ENDPOINT=http://jaeger:4317
- OTEL_SERVICE_NAME=file-storage-service
- OTEL_TRACES_EXPORTER=otlp
- OTEL_EXPORTER_JAEGER_ENABLED=false
ports:
- 45295:45295
networks:
- consul-net
volumes:
- "${PATH_TO_FILE_STORAGE}/docker-storage/files:/files"
fileStorageDb:
image: postgres:alpine
restart: unless-stopped
hostname: fileStorageDb
container_name: fileStorageDb
ports:
- 5439:5439
environment:
POSTGRES_DB: fileStorageDb
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
PGDATA: /data/postgres
volumes:
- ./fileStorageDb:/data
networks:
- consul-net
vault:
image: hashicorp/vault:1.15.2
container_name: vault
environment:
VAULT_DEV_ROOT_TOKEN_ID: "root"
VAULT_DEV_LISTEN_ADDRESS: "0.0.0.0:8200"
VAULT_ADDR: "http://vault:8200"
ports:
- "8200:8200"
volumes:
- vault_data:/vault/file
cap_add:
- IPC_LOCK
restart: unless-stopped
networks:
- consul-net
consul:
container_name: consul
image: consul:1.1.0
hostname: consul
ports:
- 8500:8500
networks:
- consul-net