-
Notifications
You must be signed in to change notification settings - Fork 26
/
Copy pathdocker-compose.grafana.yaml
53 lines (50 loc) · 1.67 KB
/
docker-compose.grafana.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
services:
prometheus:
image: prom/prometheus:v2.38.0
container_name: prometheus
restart: always
user: root
volumes:
- prometheus_data:/prometheus
- /tmp/ray:/tmp/ray
- ./src/observability/prometheus/config/prometheus.yml:/etc/prometheus/prometheus.yml
# - ./src/prometheus/config/alert-rules.yml:/etc/prometheus/alert-rules.yml
command:
- "--config.file=/etc/prometheus/prometheus.yml"
- "--storage.tsdb.path=/prometheus"
- "--web.console.libraries=/etc/prometheus/console_libraries"
- "--web.console.templates=/etc/prometheus/consoles"
- "--storage.tsdb.retention.time=20h"
- "--web.enable-lifecycle"
- "--web.listen-address=0.0.0.0:9090"
ports:
- 9090:9090
networks:
- easymlops_network
grafana:
image: grafana/grafana:latest
container_name: grafana
restart: always
user: root
volumes:
- grafana_data:/var/lib/grafana
- /tmp/ray/session_latest/metrics/grafana/dashboards:/opt/grafana/dashboards:ro
- ./src/observability/grafana/config/dashboards.yaml:/etc/grafana/provisioning/dashboards/dashboards.yaml:ro
- ./src/observability/grafana/config/datasources.yaml:/etc/grafana/provisioning/datasources/datasource.yaml:ro
environment:
- GF_SECURITY_ADMIN_USER=${ADMIN_USER:-admin}
- GF_SECURITY_ADMIN_PASSWORD=${ADMIN_PASSWORD:-admin}
ports:
- 3009:3000
networks:
- easymlops_network
healthcheck:
test: ["CMD-SHELL", "curl -f localhost:3003/api/health && echo 'ready'"]
interval: 10s
retries: 10
volumes:
prometheus_data:
grafana_data:
networks:
easymlops_network:
external: true