diff --git a/Makefile b/Makefile index 051aa7d..751ee6e 100644 --- a/Makefile +++ b/Makefile @@ -74,18 +74,22 @@ up/basic: up/bootstrap .PHONY: up/bootstrap up/bootstrap: get vendor/hosts @$(foreach SVC, $(START_BOOTSTRAP), $(shell docker-compose -f services/$(SVC)/docker-compose.yml up -d)) - @source ./bin/helper.sh - @./vendor/frostfs-adm --config frostfs-adm.yml morph init --contracts vendor/contracts - echo "Set rule chain to policy contract" - @./vendor/frostfs-adm --config frostfs-adm.yml morph \ - ape add-rule-chain --target-type namespace --target-name "" \ - --rule 'allow Container.* *' --chain-id "allow_container_ops" - @for f in ./services/storage/wallet*.json; do \ - echo "Transfer GAS to wallet $${f}" \ - && ./vendor/frostfs-adm -c frostfs-adm.yml morph refill-gas --storage-wallet $${f} --gas 10.0 \ - || die "Failed to transfer GAS to alphabet wallets"; \ + @if ! ./vendor/frostfs-adm morph dump-hashes --config frostfs-adm.yml > /dev/null 2>&1; then + @source ./bin/helper.sh + @./vendor/frostfs-adm --config frostfs-adm.yml morph init --contracts vendor/contracts + echo "Set rule chain to policy contract" + @./vendor/frostfs-adm --config frostfs-adm.yml morph \ + ape add-rule-chain --target-type namespace --target-name "" \ + --rule 'allow Container.* *' --chain-id "allow_container_ops" + @for f in ./services/storage/wallet*.json; do \ + echo "Transfer GAS to wallet $${f}" \ + && ./vendor/frostfs-adm -c frostfs-adm.yml morph refill-gas --storage-wallet $${f} --gas 10.0 \ + || die "Failed to transfer GAS to alphabet wallets"; \ done - @echo "FrostFS sidechain environment is deployed" + @echo "FrostFS sidechain environment is deployed" + else + @echo "Skipping deploy contract" + fi # Build up certain service .PHONY: up/% diff --git a/services/morph_chain/docker-compose.yml b/services/morph_chain/docker-compose.yml index dd44b2c..68535ea 100644 --- a/services/morph_chain/docker-compose.yml +++ b/services/morph_chain/docker-compose.yml @@ -19,9 +19,13 @@ services: - ./config.yml:/wallets/config.yml - ./../../vendor/hosts:/etc/hosts - ./../../wallets/wallet.json:/wallets/wallet.json + - chains:/chains networks: chain_int: internet: external: true name: basenet_internet + +volumes: + chains: diff --git a/services/morph_chain/protocol.privnet.yml b/services/morph_chain/protocol.privnet.yml index 560730a..2066029 100644 --- a/services/morph_chain/protocol.privnet.yml +++ b/services/morph_chain/protocol.privnet.yml @@ -17,7 +17,7 @@ ApplicationConfiguration: DBConfiguration: Type: "boltdb" BoltDBOptions: - FilePath: "./db/morph.bolt" + FilePath: "/chains/morph.bolt" P2P: Addresses: - ":20333"