services:
  grafana:
    container_name: grafana
    image: docker.io/grafana/grafana:13.1.0
    restart: unless-stopped
    user: root
    networks:
      - homelab-network
    security_opt:
      - no-new-privileges:true
    ports:
      - 3060:3000
    environment:
      - GF_SECURITY_ADMIN_USER=${GRAFANA_ADMIN_USER}
      - GF_SECURITY_ADMIN_PASSWORD=${GRAFANA_ADMIN_PASSWORD}
      - GF_INSTALL_PLUGINS=
      - GF_PLUGINS_ENABLE_UPDATES=false
    volumes:
      - ~/docker-volumes/grafana/data:/var/lib/grafana
      - ./docker-compose/grafana/provisioning/datasources:/etc/grafana/provisioning/datasources
      - ./docker-compose/grafana/provisioning/dashboards:/etc/grafana/provisioning/dashboards
