version: '3'
services:
  prom:
    image: prom/prometheus
    restart: always
    ports:
      - 10090:9090
    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
#    # 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"
    volumes:
      - ./prometheus.yml:/etc/prometheus/prometheus.yml
      - prom-data:/prometheus

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

  graf:
    image: grafana/grafana
    restart: always
    ports:
      - 4000:3000
    volumes:
      - ./grafana.ini:/etc/grafana/grafana.ini
      - graf-data:/var/lib/grafana

volumes:
  prom-data:
  graf-data:

networks:
  crowd-net:
    external: true
