version: "3.3"

services:
  prometheus:
    image: prom/prometheus:latest
    volumes:
      - ./prometheus.yml:/etc/prometheus/prometheus.yml
    command:
      - '--config.file=/etc/prometheus/prometheus.yml'
    ports:
      - '9090:9090'

  grafana:
    image: grafana/grafana:latest
    container_name: monitoring_grafana
    # restart: unless-stopped
    depends_on:
      - prometheus
    links:
      - prometheus:prometheus
    volumes:
      - ./bd_grafana:/var/lib/grafana
    environment:
      - GF_SECURITY_ADMIN_PASSWORD=12345
    ports:
      - '3000:3000'