shelly-exporter 0.2.0

Prometheus exporter for Shelly smart home devices
version: '3.8'

services:
  shelly-exporter:
    image: ghcr.io/rvben/shelly-exporter:latest
    container_name: shelly-exporter
    restart: unless-stopped
    ports:
      - "9925:9925"
    environment:
      # Required: comma-separated list of Shelly device URLs
      SHELLY_HOSTS: "http://192.168.1.100,http://192.168.1.101,http://192.168.1.102"
      
      # Optional: custom names for devices (same order as hosts)
      SHELLY_NAMES: "Living Room Light,Kitchen Switch,Bedroom Dimmer"
      
      # Optional: authentication (if your devices have authentication enabled)
      # SHELLY_USERNAME: "admin"
      # SHELLY_PASSWORD: "your-password"
      
      # Optional: logging level (trace, debug, info, warn, error)
      SHELLY_LOG_LEVEL: "info"
      
      # Optional: poll interval in seconds (default: 30)
      SHELLY_POLL_INTERVAL: "30"
      
      # Optional: HTTP timeout in seconds (default: 10)
      SHELLY_HTTP_TIMEOUT: "10"
      
      # Optional: enable mDNS discovery (default: false)
      # SHELLY_DISCOVERY: "true"
      # SHELLY_DISCOVERY_INTERVAL: "300"

  # Example Prometheus configuration
  prometheus:
    image: prom/prometheus:latest
    container_name: prometheus
    restart: unless-stopped
    ports:
      - "9090:9090"
    volumes:
      - ./prometheus.yml:/etc/prometheus/prometheus.yml:ro
      - prometheus_data:/prometheus
    command:
      - '--config.file=/etc/prometheus/prometheus.yml'
      - '--storage.tsdb.path=/prometheus'

volumes:
  prometheus_data: