docker-compose.yml 1.17 KB
Newer Older
1
2
3
4
5
version: '3'
services:
  prom:
    image: prom/prometheus
    restart: always
6
    ports:
7
      - 127.0.0.1:9089:9090
8
9
10
11
12
    environment:
      - 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
13
14
15
16
17
18
19
#    # uncomment to override commands and to add enable admin
#    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"
#      - "--web.enable-admin-api"
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
    volumes:
      - ./prometheus.yml:/etc/prometheus/prometheus.yml
      - prom-data:/prometheus

  bbexp:
    image: prom/blackbox-exporter
    restart: always
    environment:
      - config.file="/config.yml"
    volumes:
      - ./blackbox-exporter.yml:/config.yml

  graf:
    image: grafana/grafana
    restart: always
    ports:
36
      - 127.0.0.1:3000:3000
37
38
39
40
41
42
43
    volumes:
      - ./grafana.ini:/etc/grafana/grafana.ini
      - graf-data:/var/lib/grafana

volumes:
  prom-data:
  graf-data: