-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdocker-compose.yml
42 lines (38 loc) · 1.08 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
version: "3.9"
services:
prometheus:
container_name: prometheus
image: prom/prometheus:latest
restart: unless-stopped
tty: true
ports:
- 9090:9090
volumes:
- ${PWD}/prometheus/config/prometheus.yml:/etc/prometheus/prometheus.yml
- ${PWD}/prometheus/data:/prometheus
command: "--config.file=/etc/prometheus/prometheus.yml --storage.tsdb.retention.time=1y --web.enable-admin-api"
depends_on:
- node-exporter
grafana:
container_name: grafana
image: grafana/grafana
restart: unless-stopped
tty: true
depends_on:
- prometheus
ports:
- 3000:3000
volumes:
- ${PWD}/grafana/runtime-data:/var/lib/grafana
- ${PWD}/grafana/datasources/datasource.yml:/etc/grafana/provisioning/datasources/datasource.yml
environment:
- GF_SECURITY_ADMIN_USER=foo
- GF_SECURITY_ADMIN_PASSWORD=bar
- GF_USERS_ALLOW_SIGN_UP=false
node-exporter:
container_name: node-exporter
image: quay.io/prometheus/node-exporter:latest
restart: unless-stopped
tty: true
ports:
- 9100:9100