{"id":21347074,"url":"https://github.com/yann39/hyperledger-explorer-docker","last_synced_at":"2026-05-16T23:05:28.877Z","repository":{"id":224424393,"uuid":"753058457","full_name":"Yann39/hyperledger-explorer-docker","owner":"Yann39","description":"A running Hyperledger Fabric network integrated with Hyperledger Explorer","archived":false,"fork":false,"pushed_at":"2024-03-08T19:08:45.000Z","size":85,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-09T00:42:00.939Z","etag":null,"topics":["blockchain","docker","hyperledger","hyperledger-explorer","hyperledger-fabric","postgresql"],"latest_commit_sha":null,"homepage":"","language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Yann39.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-02-05T11:42:32.000Z","updated_at":"2024-02-25T21:12:12.000Z","dependencies_parsed_at":"2024-11-22T02:12:44.775Z","dependency_job_id":"d3296e2d-0f29-4407-802f-6292ce0274bd","html_url":"https://github.com/Yann39/hyperledger-explorer-docker","commit_stats":null,"previous_names":["yann39/hyperledger-explorer-docker"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yann39%2Fhyperledger-explorer-docker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yann39%2Fhyperledger-explorer-docker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yann39%2Fhyperledger-explorer-docker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yann39%2Fhyperledger-explorer-docker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Yann39","download_url":"https://codeload.github.com/Yann39/hyperledger-explorer-docker/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243822277,"owners_count":20353499,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["blockchain","docker","hyperledger","hyperledger-explorer","hyperledger-fabric","postgresql"],"created_at":"2024-11-22T02:12:33.554Z","updated_at":"2026-05-16T23:05:23.833Z","avatar_url":"https://github.com/Yann39.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Hyperledger Explorer setup\n\n**Windows 10** 64 bits **Hyperledger Explorer** setup using **Docker**.\n\n![Static Badge](https://img.shields.io/badge/Version-1.0.1-2AAB92)\n![Static Badge](https://img.shields.io/badge/Last%20update-07%20Sept%202018-blue)\n\n![Static Badge](https://img.shields.io/badge/Hyperledger%20Fabric-1.2-red)\n![Static Badge](https://img.shields.io/badge/Hyperledger%20Explorer-3.5-teal)\n\n---\n\n# Table of Contents\n\n* [Prerequisites](#prerequisites)\n* [Cleaning](#cleaning)\n* [Network](#network)\n* [Usage](#usage)\n* [PostGreSQL database](#postgresql-database)\n* [License](#license)\n\n# Prerequisites\n\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\n      \u003cimg alt=\"Hyperledger Explorer logo\" src=\"doc/logo-hyperledger-explorer.png\" height=\"64\"/\u003e\n    \u003c/td\u003e\n    \u003ctd\u003e\n      \u003cimg alt=\"Hyperledger Fabric logo\" src=\"doc/logo-hyperledger-fabric.png\" height=\"64\"/\u003e\n    \u003c/td\u003e\n    \u003ctd\u003e\n      \u003cimg alt=\"Docker logo\" src=\"doc/logo-docker.svg\" height=\"64\"/\u003e\n    \u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\nA running **Hyperledger Fabric** network.\n\nI used Hyperledger Fabric **v1.2**.\nSee [Hyperledger Fabric documentation](https://hyperledger-fabric.readthedocs.io/en/release-1.2/).\n\nI included the configuration for an example network (_app/config/configtx.yaml_ and _app/config/crypto-config.yaml_ files).\n\nAlso don't forget to configure **Git** for Windows :\n\nCheck _autocrlf_ :\n\n```bash\ngit config --get core.autocrlf\n```\n\nif `null` or `true`, set it to `false` :\n\n```bash\ngit config --global core.autocrlf false\n```\n\nCheck _longpaths_ :\n\n```bash\ngit config --get core.longpaths\n```\n\nif `null` or `false`, set it to `true` :\n\n```bash\ngit config --global core.longpaths true\n```\n\n# Cleaning\n\nIn case you already set up the environment, here are some useful cleanup commands\n\n1. Clean containers and volumes\n\n    ```bash\n    docker-compose down\n    ```\n\n2. Clean all containers containing \"blockchain-explorer\" in their name\n\n    ```bash\n    docker stop $(docker ps -a --filter=\"name=blockchain-explorer\")\n    docker rm $(docker ps -a --filter=\"name=blockchain-explorer\")\n    ```\n\n3. Clean all images with name starting with \"hyperledger-blockchain-explorer\" or \"dev-peer\"\n\n    ```bash\n    docker rmi $(docker images hyperledger-blockchain-explorer* -q)\n    ```\n\n4. Prune networks and volumes\n\n    ```bash\n    docker network prune\n    docker volume prune\n    ```\n\n5. Remove crypto materials\n\n    ```bash\n    rm -rf app/config/crypto-config/\n    ```\n\n# Network\n\nThe **Hyperledger network** in which I ran this example is composed of :\n\n- 2 organizations :\n    * myorg1\n    * myorg2\n- 2 peers per organization :\n    * myorg1 : peer0.myorg1.ch and peer1.myorg1.ch\n    * myorg2 : peer0.myorg2.ch and peer1.myorg2.ch\n- peer0 from both organizations have been defined as anchor peer\n- all peers use _CouchDB_ as ledger state database\n- 1 user (identity) per peer (in addition to _Admin_ user)\n- 1 orderer (use its own channel _orderer-channel_) with _kafka_ consensus\n- 1 channel _my-channel_ joined by both peer0 from both organizations\n- 1 Go chaincode\n- 4 Kafka nodes and 3 Zookeeper (as recommended)\n- 2 Certification authorities (one per organization)\n\nSee _app/config/configtx.yaml_ and _app/config/crypto-config.yaml_ for example configuration\nand [Hyperledger Fabric documentation](https://hyperledger-fabric.readthedocs.io/en/release-1.2/) for the setup.\n\n# Usage\n\nI have built a **custom setup**, that I think is simpler than the mentioned steps (from the [official repository](https://github.com/hyperledger/blockchain-explorer) _readme_ file)\nwhich consist of downloading the whole repository and then modify the files.\n\nInstead of downloading the repository locally and doing the modification in the sources,\nI get the repository directly from a **Docker** container and then link local configuration files to it using volumes.\n\nI used the **release-3.5** branch.\nYou may change the `EXPLORER_BRANCH` argument in the _docker-compose.yml_ file if you want to use a different branch (may requires other modifications).\n\nI have implemented a **Compose** file (_docker-compose.yaml_) that builds the images/containers for the application and the database.\nThe containers will be attached to the existing Docker network of our Fabric network.\n\n\u003e [!WARNING]\n\u003e Make sure you use the same Docker network as your existing Hyperledger Fabric network in the _docker-compose.yaml_ file. Mine is `config_mynw`.\n\nThe Application will attach to the database once it is ready (I used a `wait.sh` script to wait for the database to be up).\nThe initialization scripts are retrieved from the official repository in the **PostGreSQL Dockerfile**.\n\nAll that you need is in the _config_ directory :\n\n1. _config.json_ : file representing the network configuration\n2. _crypto-config_ : folder containing the network certificates\n\nSo just adapt the _config.json_ file and copy the _crypto-config_ folder from the one generated during your **Fabric** setup.\nYou can regenerate the cryptographic materials from the _app/config/configtx.yaml_ and _app/config/crypto-config.yaml_ files if needed.\n\nThen simply run :\n\n```bash\ndocker-compose up\n```\n\nThis will run 2 containers :\n\n- `hyperledger_explorer_app` : the application\n- `hyperledger_explorer_postgresql` : the PostGreSQL database\n\nYou should be able to reach http://localhost:8092\n\nFor **Swagger** API endpoint, go to http://localhost:8092/api-docs/\n\n# PostGreSQL database\n\n\u003cimg alt=\"PostGreSql logo\" src=\"doc/logo-postgresql.svg\" height=\"72\"/\u003e\n\nIf you need to enter the **PostGreSQL** database manually, here are some useful commands :\n\nGet into the container :\n\n```bash\nwinpty docker exec -it hyperledger_explorer_postgresql sh\n```\n\nConnect to PostGreSQL as `postgres` user :\n\n```bash\nsu postgres\npsql\n```\n\nor :\n\n```bash\npsql -U postgres\n```\n\nList all databases :\n\n```bash\n\\list\n```\n\nConnect to the `fabricexplorer` database :\n\n```bash\n\\connect fabricexplorer\n```\n\nSelect data :\n\n```bash\nselect * from peer;\n```\n\nQuit :\n\n```bash\n\\q\n```\n\n# License\n\n[General Public License (GPL) v3](https://www.gnu.org/licenses/gpl-3.0.en.html)\n\nThis program is free software: you can redistribute it and/or modify it under the terms of the GNU\nGeneral Public License as published by the Free Software Foundation, either version 3 of the\nLicense, or (at your option) any later version.\n\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without\neven the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\nGeneral Public License for more details.\n\nYou should have received a copy of the GNU General Public License along with this program. If not,\nsee \u003chttp://www.gnu.org/licenses/\u003e.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyann39%2Fhyperledger-explorer-docker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyann39%2Fhyperledger-explorer-docker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyann39%2Fhyperledger-explorer-docker/lists"}