version: '2'
services:
  prometheus:
    image: prom/prometheus
    container_name: prometheus
    ulimits:
      memlock:
        soft: -1
        hard: -1
      nofile:
        soft: 65536
        hard: 65536
    mem_limit: 10g
    volumes:
      - /mnt/data/prometheus:/prometheus:rw
      - ./prometheus.yml:/etc/prometheus/prometheus.yml
    ports:
      - 9090:9090
    network_mode: host
  grafana:
    image: grafana/grafana
    environment:
      GF_SECURITY_ADMIN_PASSWORD: admin
    volumes:
      - /mnt/data/grafana/:/var/lib/grafana:rw
    container_name: grafana
    ports:
      - "3000:3000"
    network_mode: host
