-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
45 lines (41 loc) · 980 Bytes
/
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
version: "3.6"
volumes:
prometheus_data: {}
grafana_data: {}
networks:
monitor-net:
driver: bridge
services:
prometheus:
image: prom/prometheus:latest
hostname: prometheus
container_name: prometheus
networks:
- monitor-net
volumes:
- ./prometheus.yml:/etc/prometheus/prometheus.yml
- prometheus_data:/prometheus
command:
- --config.file=/etc/prometheus/prometheus.yml
- --storage.tsdb.path=/prometheus
- --storage.tsdb.retention=200h
restart: always
ports:
- 9090:9090
expose:
- 9090
grafana:
container_name: grafana
depends_on:
- prometheus
networks:
- monitor-net
hostname: grafana
image: grafana/grafana:latest
volumes:
- grafana_data:/var/lib/grafana
- ./provisioning/:/etc/grafana/provisioning/
- ./dashboard.json:/etc/grafana/provisioning/dashboards/dashboard.json
restart: always
ports:
- 3000:3000