-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathdocker-compose.yml
77 lines (72 loc) · 2.34 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
volumes:
prometheus-data:
driver: local
driver_opts:
type: none
device: ${PROMETHEUS_DATA:-./prometheus/data}
o: bind
grafana-data:
driver: local
driver_opts:
type: none
device: ${GRAFANA_DATA:-./grafana/data}
o: bind
services:
prometheus:
image: prom/prometheus:${PROMETHEUS_VERSION:-v2.54.1}
ports:
- "${PROMETHEUS_BIND:-127.0.0.1}:${PROMETHEUS_PORT:-9090}:9090"
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus'
- '--storage.tsdb.retention.time=${PROMETHEUS_RETENTION_TIME:-60d}'
- '--web.console.libraries=/usr/share/prometheus/console_libraries'
- '--web.console.templates=/usr/share/prometheus/consoles'
volumes:
- ./prometheus/config/prometheus.yml:/etc/prometheus/prometheus.yml:ro
- ./cht-instances.yml:/etc/prometheus/cht-instances.yml:ro
- ./exporters/json/config/scrape_config.yml:/etc/prometheus/scrape_configs/cht-json.yml:ro
- prometheus-data:/prometheus
logging:
driver: "local"
options:
max-size: "${LOG_MAX_SIZE:-50m}"
max-file: "${LOG_MAX_FILES:-20}"
networks:
- cht-watchdog-net
restart: always
grafana:
image: grafana/grafana-oss:${GRAFANA_VERSION:-11.2.0}
ports:
- "${GRAFANA_BIND:-127.0.0.1}:${GRAFANA_PORT:-3000}:3000"
volumes:
- grafana-data:/var/lib/grafana
- ./grafana/grafana.ini:/etc/grafana/grafana.ini:ro
- ./grafana/provisioning:/etc/grafana/provisioning:rw
environment:
- GF_SECURITY_ADMIN_USER=${GRAFANA_ADMIN_USER:-medic}
- GF_SECURITY_ADMIN_PASSWORD=${GRAFANA_ADMIN_PASSWORD:-password}
- GF_USERS_ALLOW_SIGN_UP=false
- GF_INSTALL_PLUGINS=${GRAFANA_PLUGINS:-grafana-discourse-datasource}
logging:
driver: "local"
options:
max-size: "${LOG_MAX_SIZE:-50m}"
max-file: "${LOG_MAX_FILES:-20}"
networks:
- cht-watchdog-net
restart: always
json-exporter:
image: prometheuscommunity/json-exporter:${JSON_EXPORTER_VERSION:-v0.6.0}
volumes:
- ./exporters/json/config/cht.yml:/config.yml:ro
logging:
driver: "local"
options:
max-size: "${LOG_MAX_SIZE:-50m}"
max-file: "${LOG_MAX_FILES:-20}"
networks:
- cht-watchdog-net
restart: always
networks:
cht-watchdog-net: