Snippets

Beyondi d.o.o. Docker Compose YAML file for Blockchain Explorer Setup. Hyperledger Fabric

Created by Beyondi d.o.o.

# SPDX-License-Identifier: Apache-2.0
version: '2.1'

volumes:
  pgdata:
  walletstore:
  grafana-storage:
  prometheus-storage:

networks:
  mynetwork.com:
    external:
      name: network_default

services:

  explorerdb.mynetwork.com:
    image: hyperledger/explorer-db:latest
    container_name: explorerdb.mynetwork.com
    hostname: explorerdb.mynetwork.com
    environment:
      - DATABASE_DATABASE=fabricexplorer
      - DATABASE_USERNAME=postgres
      - DATABASE_PASSWORD=password
    volumes:
      - ./app/persistence/fabric/postgreSQL/db/createdb.sh:/docker-entrypoint-initdb.d/createdb.sh
      - pgdata:/var/lib/postgresql/data
    networks:
      - mynetwork.com

  explorer.mynetwork.com:
    image: hyperledger/explorer:latest
    container_name: explorer.mynetwork.com
    hostname: explorer.mynetwork.com
    environment:
      - DATABASE_HOST=explorerdb.mynetwork.com
      - DATABASE_USERNAME=postgres
      - DATABASE_PASSWD=password
      - DISCOVERY_AS_LOCALHOST=false
    volumes:
      - ./examples/net1/config.json:/opt/explorer/app/platform/fabric/config.json
      - ./examples/net1/connection-profile:/opt/explorer/app/platform/fabric/connection-profile
      - ./examples/net1/keychain:/tmp/crypto
      - walletstore:/opt/wallet
    command: sh -c "sleep 16&& node /opt/explorer/main.js && tail -f /dev/null"
    ports:
      - 8090:8080
    networks:
      - mynetwork.com

  proms:
    container_name: proms
    image: prom/prometheus:latest
    volumes:
      - ./app/platform/fabric/artifacts/operations/balance-transfer/prometheus.yml:/etc/prometheus/prometheus.yml
      - prometheus-storage:/prometheus
    ports:
      - '9090:9090'
    networks:
      - mynetwork.com

  grafana:
    container_name: grafana
    image: grafana/grafana:latest
    volumes:
      - ./app/platform/fabric/artifacts/operations/balance-transfer/balance-transfer-grafana-dashboard.json:/var/lib/grafana/dashboards/mydashboard.json
      - ./app/platform/fabric/artifacts/operations/grafana_conf/provisioning:/etc/grafana/provisioning
      - grafana-storage:/var/lib/grafana
    ports:
      - '3000:3000'
    networks:
      - mynetwork.com

Comments (0)

HTTPS SSH

You can clone a snippet to your computer for local editing. Learn more.