version: "2"

services:
  
  grafana:
    image: "grafana/grafana:master"
    ports:
      - "3000:3000"
    networks:
      - grafana
    links:
      - "graphite:graphite"
      - "influxdb:influxdb"
      - "postgres:postgres"
    environment:
      GF_DATABASE_TYPE: postgres
      GF_DATABASE_HOST: postgres:5432
      GF_DATABASE_NAME: grafana
      GF_DATABASE_USER: grafana
      GF_DATABASE_PASSWORD: password

  postgres:
    image: postgres
    networks:
      - grafana
    environment:
      POSTGRES_DB: grafana
      POSTGRES_USER: grafana
      POSTGRES_PASSWORD: password

  graphite:
    image: pgentile/graphite-api
    volumes_from:
      - "carbon:ro"
    networks:
      - graphite
      - grafana
    links:
      - "carbon:carbon"
      - "redis:redis"

  carbon:
    image: pgentile/go-carbon
    ports:
      - "2003:2003"
    networks:
      - graphite

  redis:
    image: redis
    networks:
      - graphite

  influxdb:
    image: tutum/influxdb
    ports:
      - "8083:8083"
      - "8086:8086"
    networks:
      - grafana

networks:
  grafana:
    driver: bridge
  graphite:
    driver: bridge

version: "2"

services:
  
  grafana:
    image: "grafana/grafana"
    ports:
      - "3000:3000"
    networks:
      - grafana
    links:
      - "graphite:graphite"
      - "influxdb:influxdb"
      - "postgres:postgres"
    environment:
      GF_DATABASE_TYPE: postgres
      GF_DATABASE_HOST: postgres:5432
      GF_DATABASE_NAME: grafana
      GF_DATABASE_USER: grafana
      GF_DATABASE_PASSWORD: password

  postgres:
    image: postgres
    networks:
      - grafana
    environment:
      POSTGRES_DB: grafana
      POSTGRES_USER: grafana
      POSTGRES_PASSWORD: password

  graphite:
    image: pgentile/graphite-api
    volumes_from:
      - "carbon:ro"
    networks:
      - graphite
      - grafana
    links:
      - "carbon:carbon"
      - "redis:redis"

  carbon:
    image: pgentile/go-carbon
    ports:
      - "2003:2003"
    networks:
      - graphite

  redis:
    image: redis
    networks:
      - graphite

  influxdb:
    image: tutum/influxdb
    ports:
      - "8083:8083"
      - "8086:8086"
    networks:
      - grafana

networks:
  grafana:
    driver: bridge
  graphite:
    driver: bridge

Use Grafana latest Docker build
Use Grafana latest Docker build
