services:
  grafana:
    image: grafana/grafana:latest
    user: "0:0"
    restart: always
    ports:
      - "10.99.0.1:3000:3000"
    volumes:
      - "/home/deploy/stack/soc/grafana-data:/var/lib/grafana"
      - "/opt/soc/grafana/provisioning:/etc/grafana/provisioning"
      - "/opt/soc/grafana/dashboards:/var/lib/grafana/dashboards"
    environment:
      - GF_SECURITY_ADMIN_PASSWORD=wMjFvkQ3GRWCvJbd
  loki:
    image: grafana/loki:2.9.0
    user: "0:0"
    restart: always
    volumes:
      - "/home/deploy/stack/soc/loki-data:/loki"
    networks:
      - soc
  promtail:
    image: grafana/promtail:2.9.0
    restart: always
    volumes:
      - /var/log:/var/log:ro
      - /opt/soc/promtail:/etc/promtail:ro
    command: -config.file=/etc/promtail/config.yml
    networks:
      - soc
  prometheus:
    image: prom/prometheus
    user: "0:0"
    restart: always
    volumes:
      - "/opt/soc/prometheus:/etc/prometheus"
      - "/home/deploy/stack/soc/prom-data:/prometheus"
    networks:
      - soc
  node-exporter:
    image: prom/node-exporter:latest
    restart: always
    volumes:
      - /proc:/host/proc:ro
      - /sys:/host/sys:ro
      - /:/rootfs:ro
    command:
      - '--path.procfs=/host/proc'
      - '--path.rootfs=/rootfs'
      - '--path.sysfs=/host/sys'
      - '--collector.filesystem.mount-points-exclude=^/(sys|proc|dev|host|etc)(45786|/)'
    networks:
      - soc
networks:
  soc:
    external: true
