-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose.yaml
145 lines (136 loc) · 4.75 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
version: '3'
services:
clickhouse:
container_name: clickhouse
image: clickhouse/clickhouse-server:23.8
restart: always
ports:
- 8123:8123 # http
- 9000:9000 # native protocol
- 9363:9363 # metrics server
volumes:
- clickhouse-data:/var/lib/clickhouse/
- clickhouse-logs:/var/log/clickhouse-server/
- ./config_files/clickhouse/etc/clickhouse-server:/etc/clickhouse-server
cap_add:
- SYS_NICE
- NET_ADMIN
- IPC_LOCK
ulimits:
nofile:
soft: 262144
hard: 262144
depends_on:
- minio
- minio-bucket-creator
prometheus:
container_name: prometheus
image: prom/prometheus:v2.37.9
restart: always
ports:
- 9090:9090
volumes:
- ./config_files/prometheus/:/etc/prometheus/
- prometheus_data:/prometheus
command:
- '--config.file=/etc/prometheus/prometheus.yaml'
- '--storage.tsdb.path=/prometheus'
- '--web.console.libraries=/usr/share/prometheus/console_libraries'
- '--web.console.templates=/usr/share/prometheus/consoles'
depends_on:
- minio-prometheus-monitoring-cluster
- minio-prometheus-monitoring-node
- minio-prometheus-monitoring-bucket
grafana:
container_name: grafana
image: grafana/grafana:10.0.3-ubuntu
ports:
- 3000:3000
volumes:
- grafana_data:/var/lib/grafana
- ./config_files/grafana/etc/grafana/provisioning/dashboards/:/etc/grafana/provisioning/dashboards/
- ./config_files/grafana/etc/grafana/provisioning/datasources/:/etc/grafana/provisioning/datasources/
- ./config_files/grafana/var/lib/grafana/dashboards/:/var/lib/grafana/dashboards/
# uncomment the following line, if you don't have access to grafana.com plugins and download a plugin manually (read README.md file)
- ./config_files/grafana/var/lib/grafana/plugins/:/var/lib/grafana/plugins/
depends_on:
- prometheus
minio:
container_name: minio
image: minio/minio:RELEASE.2023-09-07T02-05-02Z
restart: always
env_file:
- .env
ports:
- 9001:9001
- 9002:9002
volumes:
- minio_data:/var/lib/minio/data
command: minio server /var/lib/minio/data --address 0.0.0.0:9002 --console-address ":9001"
minio-bucket-creator:
container_name: minio-bucket-creator
image: minio/mc:RELEASE.2023-09-13T23-08-58Z
env_file:
- .env
entrypoint: >
/bin/bash -c "
/usr/bin/mc alias set myminio http://minio:9002 $MINIO_ROOT_USER $MINIO_ROOT_PASSWORD;
/usr/bin/mc mb myminio/${MINIO_CLICKHOUSE_BACKUP_BUCKET:-clickhouse};
/usr/bin/mc anonymous set public myminio/${MINIO_CLICKHOUSE_BACKUP_BUCKET:-clickhouse};
exit 0;
"
depends_on:
- minio
minio-prometheus-monitoring-cluster:
container_name: minio-prometheus-monitoring-cluster
image: minio/mc:RELEASE.2023-09-13T23-08-58Z
env_file:
- .env
volumes:
- ./config_files/prometheus/templates/prometheus.yaml:/home/prometheus-template.yaml:ro
- ./config_files/prometheus/prometheus.yaml:/home/prometheus.yaml
entrypoint: >
/bin/bash -c "
cp /home/prometheus-template.yaml /home/prometheus.yaml;
/usr/bin/mc alias set myminio http://minio:9002 $MINIO_ROOT_USER $MINIO_ROOT_PASSWORD > /dev/null;
/usr/bin/mc admin prometheus generate myminio cluster | sed '1d' | awk '{print \" \" $0}' >> /home/prometheus.yaml;
"
depends_on:
- minio
minio-prometheus-monitoring-node:
container_name: minio-prometheus-monitoring-node
image: minio/mc:RELEASE.2023-09-13T23-08-58Z
env_file:
- .env
volumes:
- ./config_files/prometheus/prometheus.yaml:/home/prometheus.yaml
entrypoint: >
/bin/bash -c "
/usr/bin/mc alias set myminio http://minio:9002 $MINIO_ROOT_USER $MINIO_ROOT_PASSWORD > /dev/null;
/usr/bin/mc admin prometheus generate myminio node | sed '1d' | awk '{print \" \" $0}' >> /home/prometheus.yaml;
"
depends_on:
- minio
- minio-prometheus-monitoring-cluster
minio-prometheus-monitoring-bucket:
container_name: minio-prometheus-monitoring-bucket
image: minio/mc:RELEASE.2023-09-13T23-08-58Z
env_file:
- .env
volumes:
- ./config_files/prometheus/prometheus.yaml:/home/prometheus.yaml
entrypoint: >
/bin/bash -c "
/usr/bin/mc alias set myminio http://minio:9002 $MINIO_ROOT_USER $MINIO_ROOT_PASSWORD > /dev/null;
/usr/bin/mc admin prometheus generate myminio bucket | sed '1d' | awk '{print \" \" $0}' >> /home/prometheus.yaml;
"
depends_on:
- minio
- minio-prometheus-monitoring-cluster
- minio-prometheus-monitoring-node
volumes:
clickhouse-data:
clickhouse-logs:
prometheus_data:
grafana_data:
minio_data: