Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
c-lightning with Prometheus, Alertmanager, and Grafana
version: '3.7'
services:
  lightning:
    image: blockstream/lightningd:prom
    container_name: lightning
    restart: always
    network_mode: "host" 
    volumes:
      - ~/extra/lightning:/root/.lightning
    command: lightningd --conf=/root/.lightning/lightning.conf 
  prometheus:
    image: prom/prometheus:v2.12.0
    container_name: prometheus
    restart: always
    network_mode: "host"
    volumes:
      - ~/extra/prom/data:/data
      - ~/extra/prom/prometheus.yaml:/config/prometheus.yaml:ro
      - ~/extra/prom/alerts.yaml:/config/alerts.yaml:ro
    command:
      - --config.file=/config/prometheus.yaml 
      - --storage.tsdb.path=/data/metrics 
      - --storage.tsdb.retention=31d
  
  alertmanager:
    image: prom/prometheus:v2.12.0
    container_name: alertmanager
    restart: always
    network_mode: "host" 
    volumes:
      - ~/extra/prom/data:/data
      - ~/extra/prom/alertmanager.yaml:/config/alertmanager.yaml:ro
    entrypoint: /bin/alertmanager
    command:
      - --config.file=/config/alertmanager.yaml
  grafana:
    image: grafana/grafana:6.3.5
    container_name: grafana
    restart: always
    network_mode: "host"
    volumes:
      - ~/extra/grafana/data:/var/lib/grafana 
      - ~/extra/grafana/provisioning:/etc/grafana/provisioning
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.