services: prometheus: image: prom/prometheus:latest container_name: prometheus command: - '--config.file=/etc/prometheus/prometheus.yml' - '--storage.tsdb.path=/prometheus' volumes: - ./prometheus.yml:/etc/prometheus/prometheus.yml:ro - prometheus-data:/prometheus ports: - "${PROMETHEUS_PORT:-127.0.0.1:9090}:9090" restart: unless-stopped grafana: image: grafana/grafana-oss:latest container_name: grafana environment: GF_SERVER_ROOT_URL: "${GRAFANA_ROOT_URL:-http://localhost:3002}" GF_SECURITY_ADMIN_USER: "${GRAFANA_ADMIN_USER:-admin}" GF_SECURITY_ADMIN_PASSWORD: "${GRAFANA_ADMIN_PASSWORD}" volumes: - grafana-data:/var/lib/grafana ports: - "${GRAFANA_PORT:-127.0.0.1:3002}:3000" restart: unless-stopped blackbox-exporter: image: prom/blackbox-exporter:latest container_name: blackbox-exporter command: - '--config.file=/etc/blackbox_exporter/config.yml' volumes: - ./blackbox.yml:/etc/blackbox_exporter/config.yml:ro ports: - "${BLACKBOX_PORT:-127.0.0.1:9115}:9115" restart: unless-stopped node-exporter: image: prom/node-exporter:latest container_name: node-exporter command: - '--path.rootfs=/host' volumes: - /:/host:ro,rslave ports: - "${NODE_EXPORTER_PORT:-9100}:9100" restart: unless-stopped volumes: prometheus-data: grafana-data: