-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
65 lines (62 loc) · 2.16 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
services:
metricly:
container_name: metricly_metricly
build:
context: .
dockerfile: Dockerfile
restart: always
network_mode: host
volumes:
- ./config/config.yaml:/etc/metricly/config.yaml:ro,z
- /:/host/root:ro,rslave # Changes in the source (host) are reflected in the container, not vice-versa
environment:
- HOSTNAME=${HOSTNAME}
- PROC_CPU_STAT=/host/root/proc/stat
- PROC_MEMORY_INFO=/host/root/proc/meminfo
- PROC_NETWORK_DEV=/host/root/proc/net/dev
- PROC_DISK_MOUNTS=/host/root/proc/mounts
- PROC_DISK_STATS=/host/root/proc/diskstats
healthcheck:
test: ["CMD", "/bin/sh /metricly/healthcheck metricly"]
interval: 30s
timeout: 5s
retries: 3
start_period: 10s
prometheus:
container_name: metricly_prometheus
image: quay.io/prometheus/prometheus:v2.36.2
network_mode: host
volumes:
- ./config/prometheus/:/etc/prometheus/:ro,z
- ./config/prometheus/alerts:/etc/prometheus/alerts:ro,z
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus'
- '--web.console.libraries=/usr/share/prometheus/console_libraries'
- '--web.console.templates=/usr/share/prometheus/consoles'
restart: always
depends_on:
- metricly
grafana:
container_name: metricly_grafana
image: docker.io/grafana/grafana:11.3.1
network_mode: host
environment:
- GF_SECURITY_ADMIN_USER=admin
- GF_SECURITY_ADMIN_PASSWORD=admin
volumes:
- ./config/grafana/provisioning/:/etc/grafana/provisioning/:ro,z
- ./config/grafana/visualizations/infrastructure.json:/var/lib/grafana/dashboards/infrastructure.json:ro,z
- ./config/grafana/visualizations/go-runtime.json:/var/lib/grafana/dashboards/go-runtime.json:ro,z
restart: always
depends_on:
- prometheus
alertmanager:
container_name: metricly_alertmanager
image: docker.io/prom/alertmanager:v0.27.0
network_mode: host
volumes:
- ./config/alertmanager/alertmanager.yml:/etc/alertmanager/alertmanager.yml:ro,z
restart: always
depends_on:
- prometheus