From 11ba930712b629a9eb25f6962ca5d8eca4bc382c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20Vi=C3=A9not?= Date: Wed, 22 Nov 2023 11:59:58 +0100 Subject: [PATCH] Add mount point for networks-config.json when running in Docker (#761) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Simon ViƩnot --- .gitignore | 3 +- README.md | 3 ++ docker-compose.yml | 2 ++ networks-config-example.json | 54 ++++++++++++++++++++++++++++++++++++ 4 files changed, 61 insertions(+), 1 deletion(-) create mode 100644 networks-config-example.json diff --git a/.gitignore b/.gitignore index ed9a8cfc4..2c260d95c 100644 --- a/.gitignore +++ b/.gitignore @@ -35,9 +35,10 @@ coverage /dist -# local env files +# local env and configuration files .env.local .env.*.local +networks-config.json # Editor directories and files .vscode diff --git a/README.md b/README.md index 2a1bec616..6fba210d2 100644 --- a/README.md +++ b/README.md @@ -49,6 +49,9 @@ npm run test:e2e # Build the Docker image locally npm run docker:build +# Copy and adjust configuration of Hedera networks as needed +cp networks-config-example.json networks-config.json + # Start the Docker container # (if not built locally, this will fetch a pre-built image from Google Container Registry) npm run docker:start diff --git a/docker-compose.yml b/docker-compose.yml index f1e449286..e5a96aae8 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -7,3 +7,5 @@ services: restart: "always" ports: - "8080:8080" + volumes: + - ./networks-config.json:/app/networks-config.json \ No newline at end of file diff --git a/networks-config-example.json b/networks-config-example.json new file mode 100644 index 000000000..123a5578b --- /dev/null +++ b/networks-config-example.json @@ -0,0 +1,54 @@ +[ + { + "name": "mainnet", + "displayName": "MAINNET", + "url": "https://mainnet-public.mirrornode.hedera.com/", + "ledgerID": "00", + "sourcifySetup": { + "activate": true, + "repoURL": "http://localhost:10000/contracts/", + "serverURL": "http://localhost:5002/", + "verifierURL": "http://localhost:3000/#/", + "chainID": 295 + } + }, + { + "name": "testnet", + "displayName": "TESTNET", + "url": "https://testnet.mirrornode.hedera.com/", + "ledgerID": "01", + "sourcifySetup": { + "activate": true, + "repoURL": "http://localhost:10000/contracts/", + "serverURL": "http://localhost:5002/", + "verifierURL": "http://localhost:3000/#/", + "chainID": 296 + } + }, + { + "name": "previewnet", + "displayName": "PREVIEWNET", + "url": "https://previewnet.mirrornode.hedera.com/", + "ledgerID": "02", + "sourcifySetup": { + "activate": true, + "repoURL": "http://localhost:10000/contracts/", + "serverURL": "http://localhost:5002/", + "verifierURL": "http://localhost:3000/#/", + "chainID": 297 + } + }, + { + "name": "localnode", + "displayName": "LOCAL NODE", + "url": "http://127.0.0.1:5551", + "ledgerID": "FF", + "sourcifySetup": { + "activate": true, + "repoURL": "http://localhost:10000/contracts/", + "serverURL": "http://localhost:5002/", + "verifierURL": "http://localhost:3000/#/", + "chainID": 298 + } + } +] \ No newline at end of file