From 3fae829465e3cce97159eb29343ac5b8bb24bfc4 Mon Sep 17 00:00:00 2001 From: adirola Date: Tue, 27 Jun 2023 13:11:05 +0400 Subject: [PATCH] Introduced docker compose v2 support through file deploy-dockerv2.sh --- docker/scripts/deploy-dockerv2.sh | 16 ++++++++++++++++ package.json | 1 + 2 files changed, 17 insertions(+) create mode 100644 docker/scripts/deploy-dockerv2.sh diff --git a/docker/scripts/deploy-dockerv2.sh b/docker/scripts/deploy-dockerv2.sh new file mode 100644 index 000000000..aae943c2c --- /dev/null +++ b/docker/scripts/deploy-dockerv2.sh @@ -0,0 +1,16 @@ +#!/bin/bash +sudo rm -rf docker/gethData/geth_data +DEV_PERIOD=1 docker compose -f docker/docker-compose.geth.yml up -d geth +sleep 5 +node docker/scripts/fund-accounts.js +cp docker/scripts/deploy_parameters_docker.json deployment/deploy_parameters.json +cp docker/scripts/genesis_docker.json deployment/genesis.json +npx hardhat run deployment/testnet/prepareTestnet.js --network localhost +npx hardhat run deployment/2_deployPolygonZKEVMDeployer.js --network localhost +npx hardhat run deployment/3_deployContracts.js --network localhost +mkdir docker/deploymentOutput +mv deployment/deploy_output.json docker/deploymentOutput +docker compose -f docker/docker-compose.geth.yml down +sudo docker build -t hermeznetwork/geth-zkevm-contracts -f docker/Dockerfile.geth . +# Let it readable for the multiplatform build coming later! +sudo chmod -R go+rxw docker/gethData \ No newline at end of file diff --git a/package.json b/package.json index 85cc39c16..147fa331b 100644 --- a/package.json +++ b/package.json @@ -82,6 +82,7 @@ "lint:fix": "npx eslint ./test --fix && npx eslint ./docker/scripts --fix && npx eslint ./deployment --fix && npx eslint ./src --fix", "compile": "npx hardhat compile", "docker:contracts": "./docker/scripts/deploy-docker.sh", + "dockerv2:contracts": "./docker/scripts/deploy-dockerv2.sh", "push:docker:contracts": "docker push hermeznetwork/geth-zkevm-contracts", "update:genesis": "node deployment/1_createGenesis.js && node deployment/1_createGenesis.js --test --input ../docker/scripts/deploy_parameters_docker.json --out ../docker/scripts/genesis_docker.json", "coverage": "npx hardhat coverage",