-
Notifications
You must be signed in to change notification settings - Fork 25
/
docker-compose.yml
279 lines (264 loc) · 7.75 KB
/
docker-compose.yml
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
270
271
272
273
274
275
276
277
278
279
# This file used for both developer and demo purposes.
# It contains environment
version: '3.7'
services:
traefik:
image: traefik:v3.2.3
hostname: traefik
restart: unless-stopped
environment:
- OTEL_PROPAGATORS=jaeger
# The Static Configuration
command: --configFile=/etc/traefik/traefik.yml
ports:
- 0.0.0.0:8081:8081
extra_hosts:
# https://github.com/moby/moby/pull/40007
# works on Docker for Mac 3.4.0 or Linux Docker 20.10.4
- "host.docker.internal:host-gateway"
volumes:
- /var/run/docker.sock:/var/run/docker.sock:z
- ./docker/traefik:/etc/traefik:z
logging:
# https://docs.docker.com/engine/logging/drivers/fluentd/
driver: "fluentd"
options:
fluentd-address: unix:///var/run/fluent-bit/socket
fluentd-async: "true" # in order not to fail in case traefik started faster than fluent-bit
tag: videochat.infra.traefik
fluentd-sub-second-precision: "true"
networks:
backend:
postgresql:
image: postgres:17.0-alpine3.20
restart: unless-stopped
ports:
- 35432:5432
volumes:
- ./docker/postgresql/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d:z
- postgres_data:/var/lib/postgresql/data:z
environment:
- POSTGRES_PASSWORD=postgresqlPassword
networks:
backend:
logging:
driver: "json-file"
options:
max-size: "50m"
max-file: "1"
redis:
image: valkey/valkey:8.0.0-alpine3.20
hostname: redis
restart: unless-stopped
ports:
- 36379:6379
volumes:
- redis_data_dir:/data:z
networks:
backend:
logging:
driver: "json-file"
options:
max-size: "50m"
max-file: "1"
minio:
image: bitnami/minio:2024.1.29-debian-11-r0
hostname: minio
restart: unless-stopped
ports:
- 39000:9000
- 39001:9001
networks:
backend:
environment:
- MINIO_ROOT_USER=AKIAIOSFODNN7EXAMPLE
- MINIO_ROOT_PASSWORD=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
- MINIO_NOTIFY_AMQP_ENABLE_primary=on
- MINIO_NOTIFY_AMQP_URL_primary=amqp://videoChat:videoChatPazZw0rd@rabbitmq:5672
- MINIO_NOTIFY_AMQP_EXCHANGE_primary=minio-events
- MINIO_NOTIFY_AMQP_EXCHANGE_TYPE_primary=direct
- MINIO_NOTIFY_AMQP_MANDATORY_primary=off
- MINIO_NOTIFY_AMQP_DURABLE_primary=on
- MINIO_NOTIFY_AMQP_NO_WAIT_primary=off
- MINIO_NOTIFY_AMQP_AUTO_DELETED_primary=off
- MINIO_NOTIFY_AMQP_DELIVERY_MODE_primary=2
- MINIO_PROMETHEUS_AUTH_TYPE=public
- MINIO_BROWSER_REDIRECT_URL=http://localhost:8081/minio
volumes:
- minio_data:/bitnami/minio/data:z
logging:
driver: "json-file"
options:
max-size: "50m"
max-file: "1"
rabbitmq:
image: rabbitmq:4.0.2-management-alpine
hostname: rabbitmq
restart: unless-stopped
ports:
- 35672:15672
- 36672:5672
environment:
- RABBITMQ_DEFAULT_USER=videoChat
- RABBITMQ_DEFAULT_PASS=videoChatPazZw0rd
volumes:
- rabbitmq_data_dir:/var/lib/rabbitmq/mnesia:z
- ./docker/rabbitmq/additional.conf:/etc/rabbitmq/conf.d/additional.conf:ro,z
networks:
backend:
logging:
driver: "json-file"
options:
max-size: "50m"
livekit:
image: livekit/livekit-server:v1.8.0
command: --config /etc/livekit.yaml
restart: unless-stopped
network_mode: "host"
volumes:
- ./docker/livekit/livekit.yaml:/etc/livekit.yaml
egress:
image: livekit/egress:v1.8.4
restart: unless-stopped
networks:
backend:
environment:
- EGRESS_CONFIG_FILE=/etc/egress/config.yaml
extra_hosts:
- "host.docker.internal:host-gateway"
volumes:
- ./docker/egress/config.yaml:/etc/egress/config.yaml
- egress_tmp:/home/egress/tmp:z
cap_add:
- SYS_ADMIN
jaeger:
image: jaegertracing/all-in-one:1.58.1
hostname: jaeger
restart: unless-stopped
ports:
# https://www.jaegertracing.io/docs/1.54/deployment/
- 4318:4318 # OTLP GRPC over HTTP (aaa, traefik)
- 4317:4317 # OTLP GRPC (other microservices)
- 16686:16686 # web ui
networks:
backend:
environment:
- QUERY_BASE_PATH=/jaeger
logging:
driver: "json-file"
options:
max-size: "50m"
max-file: "1"
command:
- --memory.max-traces=100000
pgadmin:
restart: unless-stopped
hostname: pgadmin
image: dcagatay/pwless-pgadmin4:8.13
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgresqlPassword
- POSTGRES_HOST=postgresql
- POSTGRES_PORT=5432
- PGADMIN_DISABLE_POSTFIX=1
- PGADMIN_LISTEN_ADDRESS=0.0.0.0
- PGADMIN_LISTEN_PORT=8080
- SCRIPT_NAME=/postgresql
networks:
backend:
logging:
driver: "json-file"
options:
max-size: "50m"
max-file: "1"
fluentbit:
image: fluent/fluent-bit:3.2.3
restart: unless-stopped
hostname: fluentbit
volumes:
- ./docker/fluent-bit/etc:/fluent-bit/etc:z
- /var/run/fluent-bit:/var/run/fluent-bit:z
- ./aaa/logs:/var/log/videochat/aaa/logs:z
- ./chat/logs:/var/log/videochat/chat/logs:z
- ./storage/logs:/var/log/videochat/storage/logs:z
- ./video/logs:/var/log/videochat/video/logs:z
- ./event/logs:/var/log/videochat/event/logs:z
- ./notification/logs:/var/log/videochat/notification/logs:z
- ./public/logs:/var/log/videochat/public/logs:z
networks:
backend:
logging:
driver: "json-file"
options:
max-size: "50m"
max-file: "1"
opensearch:
image: opensearchproject/opensearch:2.18.0
hostname: opensearch
restart: unless-stopped
environment:
- node.name=opensearch
- discovery.type=single-node
- bootstrap.memory_lock=true # along with the memlock settings below, disables swapping
- "OPENSEARCH_JAVA_OPTS=-Xms512m -Xmx512m" # minimum and maximum Java heap size, recommend setting both to 50% of system RAM
# - OPENSEARCH_INITIAL_ADMIN_PASSWORD=yourStrongPassword123!
# https://opensearch.org/docs/latest/install-and-configure/install-opensearch/docker/
- DISABLE_SECURITY_PLUGIN=true
- DISABLE_INSTALL_DEMO_CONFIG=true
ulimits:
memlock:
soft: -1
hard: -1
nofile:
soft: 65536 # maximum number of open files for the OpenSearch user, set to at least 65536 on modern systems
hard: 65536
networks:
backend:
volumes:
- opensearch_data_dir:/usr/share/opensearch/data
- ./docker/opensearch/docker-entrypoint-init.d.sh:/docker-entrypoint-init.d.sh:z
- ./docker/opensearch/docker-entrypoint-init.d:/docker-entrypoint-init.d:z
ports:
- 9200:9200
# - 9600:9600 # required for Performance Analyzer
entrypoint: ["/docker-entrypoint-init.d.sh"]
logging:
driver: "json-file"
options:
max-size: "50m"
max-file: "1"
dashboards:
image: opensearchproject/opensearch-dashboards:2.18.0
hostname: dashboards
restart: unless-stopped
ports:
- 5601:5601
networks:
backend:
environment:
OPENSEARCH_HOSTS: '["http://opensearch:9200"]'
# https://stackoverflow.com/a/74178195
DISABLE_SECURITY_DASHBOARDS_PLUGIN: true
SERVER_BASEPATH: /opensearch-dashboards
SERVER_REWRITEBASEPATH: true
logging:
driver: "json-file"
options:
max-size: "50m"
max-file: "1"
volumes:
postgres_data:
redis_data_dir:
minio_data:
rabbitmq_data_dir:
egress_tmp:
opensearch_data_dir:
networks:
backend:
driver: bridge
driver_opts:
com.docker.network.bridge.host_binding_ipv4: "127.0.0.1"
ipam:
driver: default
config:
- subnet: 172.28.0.0/24