From bc78dbf01c6e806c80f0e9c096262ef0001dd81e Mon Sep 17 00:00:00 2001 From: Evgeniy Stratonikov Date: Tue, 19 Oct 2021 19:01:03 +0300 Subject: [PATCH] .docker: dynamically allocate IP for privnet Signed-off-by: Evgeniy Stratonikov --- .docker/docker-compose.yml | 17 +---------------- config/protocol.privnet.docker.four.yml | 16 ++++++++-------- config/protocol.privnet.docker.one.yml | 16 ++++++++-------- config/protocol.privnet.docker.single.yml | 4 ++-- config/protocol.privnet.docker.three.yml | 16 ++++++++-------- config/protocol.privnet.docker.two.yml | 16 ++++++++-------- 6 files changed, 35 insertions(+), 50 deletions(-) diff --git a/.docker/docker-compose.yml b/.docker/docker-compose.yml index 8102ef9a3..b7eabc902 100644 --- a/.docker/docker-compose.yml +++ b/.docker/docker-compose.yml @@ -1,7 +1,7 @@ version: '2.4' networks: - neo_go_network: + default: name: neo_go_network ipam: config: @@ -21,9 +21,6 @@ services: - ../config/protocol.privnet.docker.one.yml:/config/protocol.privnet.yml - ./wallets/wallet1.json:/wallet1.json - volume_chain:/chains - networks: - neo_go_network: - ipv4_address: 172.200.0.1 ports: - 20333:20333 - 30333:30333 @@ -36,9 +33,6 @@ services: - ../config/protocol.privnet.docker.two.yml:/config/protocol.privnet.yml - ./wallets/wallet2.json:/wallet2.json - volume_chain:/chains - networks: - neo_go_network: - ipv4_address: 172.200.0.2 ports: - 20334:20334 - 30334:30334 @@ -51,9 +45,6 @@ services: - ../config/protocol.privnet.docker.three.yml:/config/protocol.privnet.yml - ./wallets/wallet3.json:/wallet3.json - volume_chain:/chains - networks: - neo_go_network: - ipv4_address: 172.200.0.3 ports: - 20335:20335 - 30335:30335 @@ -66,9 +57,6 @@ services: - ../config/protocol.privnet.docker.four.yml:/config/protocol.privnet.yml - ./wallets/wallet4.json:/wallet4.json - volume_chain:/chains - networks: - neo_go_network: - ipv4_address: 172.200.0.4 ports: - 20336:20336 - 30336:30336 @@ -81,9 +69,6 @@ services: - ../config/protocol.privnet.docker.single.yml:/config/protocol.privnet.yml - ./wallets/wallet1_solo.json:/wallet1.json - volume_chain:/chains - networks: - neo_go_network: - ipv4_address: 172.200.0.1 ports: - 20333:20333 - 30333:30333 diff --git a/config/protocol.privnet.docker.four.yml b/config/protocol.privnet.docker.four.yml index 23a0e1ad5..9abac56cc 100644 --- a/config/protocol.privnet.docker.four.yml +++ b/config/protocol.privnet.docker.four.yml @@ -10,10 +10,10 @@ ProtocolConfiguration: - 02a7bc55fe8684e0119768d104ba30795bdcc86619e864add26156723ed185cd62 ValidatorsCount: 4 SeedList: - - 172.200.0.1:20333 - - 172.200.0.2:20334 - - 172.200.0.3:20335 - - 172.200.0.4:20336 + - node_one:20333 + - node_two:20334 + - node_three:20335 + - node_four:20336 VerifyBlocks: true VerifyTransactions: true P2PSigExtensions: false @@ -60,10 +60,10 @@ ApplicationConfiguration: AllowedContentTypes: - application/json Nodes: - - 172.200.0.1:30333 - - 172.200.0.2:30334 - - 172.200.0.3:30335 - - 172.200.0.4:30336 + - node_one:30333 + - node_two:30334 + - node_three:30335 + - node_four:30336 RequestTimeout: 5s UnlockWallet: Path: "/wallet4.json" diff --git a/config/protocol.privnet.docker.one.yml b/config/protocol.privnet.docker.one.yml index e59201455..558069494 100644 --- a/config/protocol.privnet.docker.one.yml +++ b/config/protocol.privnet.docker.one.yml @@ -10,10 +10,10 @@ ProtocolConfiguration: - 02a7bc55fe8684e0119768d104ba30795bdcc86619e864add26156723ed185cd62 ValidatorsCount: 4 SeedList: - - 172.200.0.1:20333 - - 172.200.0.2:20334 - - 172.200.0.3:20335 - - 172.200.0.4:20336 + - node_one:20333 + - node_two:20334 + - node_three:20335 + - node_four:20336 VerifyBlocks: true VerifyTransactions: true P2PSigExtensions: false @@ -60,10 +60,10 @@ ApplicationConfiguration: AllowedContentTypes: - application/json Nodes: - - 172.200.0.1:30333 - - 172.200.0.2:30334 - - 172.200.0.3:30335 - - 172.200.0.4:30336 + - node_one:30333 + - node_two:30334 + - node_three:30335 + - node_four:30336 RequestTimeout: 5s UnlockWallet: Path: "/wallet1.json" diff --git a/config/protocol.privnet.docker.single.yml b/config/protocol.privnet.docker.single.yml index fa445c11c..8b1de6ef4 100644 --- a/config/protocol.privnet.docker.single.yml +++ b/config/protocol.privnet.docker.single.yml @@ -7,7 +7,7 @@ ProtocolConfiguration: - 02b3622bf4017bdfe317c58aed5f4c753f206b7db896046fa7d774bbc4bf7f8dc2 ValidatorsCount: 1 SeedList: - - 172.200.0.1:20333 + - node_single:20333 VerifyBlocks: true VerifyTransactions: true P2PSigExtensions: false @@ -54,7 +54,7 @@ ApplicationConfiguration: AllowedContentTypes: - application/json Nodes: - - 172.200.0.1:30333 + - node_single:30333 RequestTimeout: 5s UnlockWallet: Path: "/wallet1_solo.json" diff --git a/config/protocol.privnet.docker.three.yml b/config/protocol.privnet.docker.three.yml index 9544bc469..2cdd77b2c 100644 --- a/config/protocol.privnet.docker.three.yml +++ b/config/protocol.privnet.docker.three.yml @@ -10,10 +10,10 @@ ProtocolConfiguration: - 02a7bc55fe8684e0119768d104ba30795bdcc86619e864add26156723ed185cd62 ValidatorsCount: 4 SeedList: - - 172.200.0.1:20333 - - 172.200.0.2:20334 - - 172.200.0.3:20335 - - 172.200.0.4:20336 + - node_one:20333 + - node_two:20334 + - node_three:20335 + - node_four:20336 VerifyBlocks: true VerifyTransactions: true P2PSigExtensions: false @@ -60,10 +60,10 @@ ApplicationConfiguration: AllowedContentTypes: - application/json Nodes: - - 172.200.0.1:30333 - - 172.200.0.2:30334 - - 172.200.0.3:30335 - - 172.200.0.4:30336 + - node_one:30333 + - node_two:30334 + - node_three:30335 + - node_four:30336 RequestTimeout: 5s UnlockWallet: Path: "/wallet3.json" diff --git a/config/protocol.privnet.docker.two.yml b/config/protocol.privnet.docker.two.yml index 435d98a76..92b0f868a 100644 --- a/config/protocol.privnet.docker.two.yml +++ b/config/protocol.privnet.docker.two.yml @@ -10,10 +10,10 @@ ProtocolConfiguration: - 02a7bc55fe8684e0119768d104ba30795bdcc86619e864add26156723ed185cd62 ValidatorsCount: 4 SeedList: - - 172.200.0.1:20333 - - 172.200.0.2:20334 - - 172.200.0.3:20335 - - 172.200.0.4:20336 + - node_one:20333 + - node_two:20334 + - node_three:20335 + - node_four:20336 VerifyBlocks: true VerifyTransactions: true P2PSigExtensions: false @@ -60,10 +60,10 @@ ApplicationConfiguration: AllowedContentTypes: - application/json Nodes: - - 172.200.0.1:30333 - - 172.200.0.2:30334 - - 172.200.0.3:30335 - - 172.200.0.4:30336 + - node_one:30333 + - node_two:30334 + - node_three:30335 + - node_four:30336 RequestTimeout: 5s UnlockWallet: Path: "/wallet2.json"