-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathcompose.yaml
More file actions
166 lines (159 loc) · 5.04 KB
/
Copy pathcompose.yaml
File metadata and controls
166 lines (159 loc) · 5.04 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
services:
realtime-cache:
image: redis:7.2-alpine
container_name: rtms-realtime-cache
restart: unless-stopped
environment:
REDIS_PASSWORD: ${REDIS_PASSWORD:-rtms_redis_password}
command:
- redis-server
- --appendonly
- "yes"
- --appendfsync
- everysec
- --requirepass
- ${REDIS_PASSWORD:-rtms_redis_password}
- --save
- "60"
- "1000"
ports:
- "127.0.0.1:${REDIS_PORT:-6379}:6379"
volumes:
- type: bind
source: ./.data/redis
target: /data
healthcheck:
test: ["CMD-SHELL", "REDISCLI_AUTH=\"$${REDIS_PASSWORD}\" redis-cli ping | grep PONG"]
interval: 10s
timeout: 5s
retries: 10
object-storage:
image: minio/minio:RELEASE.2025-04-22T22-12-26Z
container_name: rtms-object-storage
restart: unless-stopped
command:
- server
- /data
- --console-address
- ":9001"
environment:
MINIO_ROOT_USER: ${MINIO_ROOT_USER:-rtms_minio}
MINIO_ROOT_PASSWORD: ${MINIO_ROOT_PASSWORD:-rtms_minio_password}
ports:
- "127.0.0.1:${MINIO_API_PORT:-9000}:9000"
- "127.0.0.1:${MINIO_CONSOLE_PORT:-9001}:9001"
volumes:
- type: bind
source: ./.data/minio
target: /data
healthcheck:
test: ["CMD", "mc", "ready", "local"]
interval: 10s
timeout: 5s
retries: 10
rabbitmq:
image: rabbitmq:3.13-management-alpine
container_name: rtms-rabbitmq
restart: unless-stopped
environment:
RABBITMQ_DEFAULT_USER: ${RABBITMQ_USER:-rtms}
RABBITMQ_DEFAULT_PASS: ${RABBITMQ_PASSWORD:-rtms_password}
RABBITMQ_DEFAULT_VHOST: ${RABBITMQ_VHOST:-rtms}
RABBITMQ_SERVER_ADDITIONAL_ERL_ARGS: "-rabbitmq_management load_definitions \"/etc/rabbitmq/definitions.json\""
ports:
- "127.0.0.1:${RABBITMQ_PORT:-5672}:5672"
- "127.0.0.1:${RABBITMQ_MANAGEMENT_PORT:-15672}:15672"
volumes:
- type: bind
source: ./.data/rabbitmq
target: /var/lib/rabbitmq
- type: bind
source: ./02-central-route-dispatcher/rabbitmq/definitions.json
target: /etc/rabbitmq/definitions.json
read_only: true
healthcheck:
test: ["CMD", "rabbitmq-diagnostics", "-q", "ping"]
interval: 10s
timeout: 5s
retries: 10
prometheus:
image: prom/prometheus:v2.55.1
container_name: rtms-prometheus
restart: unless-stopped
extra_hosts:
- "host.docker.internal:host-gateway"
command:
- --config.file=/etc/prometheus/prometheus.yml
- --storage.tsdb.path=/prometheus
- --storage.tsdb.retention.time=${PROMETHEUS_RETENTION:-15d}
ports:
- "${OBSERVABILITY_BIND_ADDR:-127.0.0.1}:${PROMETHEUS_PORT:-9090}:9090"
volumes:
- type: bind
source: ./07-observability-dashboarding/prometheus/prometheus.yml
target: /etc/prometheus/prometheus.yml
read_only: true
- type: bind
source: ./.data/prometheus
target: /prometheus
loki:
image: grafana/loki:2.9.8
container_name: rtms-loki
restart: unless-stopped
command:
- -config.file=/etc/loki/local-config.yaml
ports:
- "${OBSERVABILITY_BIND_ADDR:-127.0.0.1}:${LOKI_PORT:-3100}:3100"
volumes:
- type: bind
source: ./07-observability-dashboarding/loki/loki.yml
target: /etc/loki/local-config.yaml
read_only: true
- type: bind
source: ./.data/loki
target: /loki
otel-collector:
image: otel/opentelemetry-collector-contrib:0.113.0
container_name: rtms-otel-collector
restart: unless-stopped
command:
- --config=/etc/otelcol-contrib/config.yaml
ports:
- "${OBSERVABILITY_BIND_ADDR:-127.0.0.1}:${OTEL_GRPC_PORT:-4317}:4317"
- "${OBSERVABILITY_BIND_ADDR:-127.0.0.1}:${OTEL_HTTP_PORT:-4318}:4318"
- "${OBSERVABILITY_BIND_ADDR:-127.0.0.1}:${OTEL_METRICS_PORT:-8889}:8889"
volumes:
- type: bind
source: ./07-observability-dashboarding/otel/otel-collector.yml
target: /etc/otelcol-contrib/config.yaml
read_only: true
depends_on:
- loki
# Optional: run the Node realtime-cache API on the host with
# `npm run start:realtime-cache`. Prometheus scrapes it through
# host.docker.internal:4560.
grafana:
image: grafana/grafana:11.3.1
container_name: rtms-grafana
restart: unless-stopped
environment:
GF_SECURITY_ADMIN_USER: ${GRAFANA_ADMIN_USER:-admin}
GF_SECURITY_ADMIN_PASSWORD: ${GRAFANA_ADMIN_PASSWORD:-admin}
GF_USERS_ALLOW_SIGN_UP: "false"
ports:
- "${OBSERVABILITY_BIND_ADDR:-127.0.0.1}:${GRAFANA_PORT:-3001}:3000"
volumes:
- type: bind
source: ./.data/grafana
target: /var/lib/grafana
- type: bind
source: ./07-observability-dashboarding/grafana/provisioning
target: /etc/grafana/provisioning
read_only: true
- type: bind
source: ./07-observability-dashboarding/grafana/dashboards
target: /var/lib/grafana/dashboards
read_only: true
depends_on:
- prometheus
- loki