Skip to content

Instantly share code, notes, and snippets.

@niftynei
Created September 24, 2019 17:53
Show Gist options
  • Save niftynei/b9fec40c30692f6ba9f56aa4f58e44bd to your computer and use it in GitHub Desktop.
Save niftynei/b9fec40c30692f6ba9f56aa4f58e44bd to your computer and use it in GitHub Desktop.
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