Skip to content

Commit

Permalink
Merge pull request #295 from 0xPolygonHermez/feature/update-dockerv2
Browse files Browse the repository at this point in the history
fix dockerv2 sudo
  • Loading branch information
krlosMata authored Jul 23, 2024
2 parents ecc2cb8 + c4894b2 commit f653902
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
12 changes: 6 additions & 6 deletions docker/scripts/v2/deploy-docker.sh
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
#!/bin/bash
sudo rm -rf docker/gethData/geth_data
DEV_PERIOD=1 docker-compose -f docker/docker-compose.yml up -d geth
sudo DEV_PERIOD=1 docker-compose -f docker/docker-compose.yml up -d geth
sleep 5
node docker/scripts/fund-accounts.js
cp docker/scripts/v2/deploy_parameters_docker.json deployment/v2/deploy_parameters.json
cp docker/scripts/v2/create_rollup_parameters_docker.json deployment/v2/create_rollup_parameters.json
npm run deploy:testnet:v2:localhost
mkdir docker/deploymentOutput
mv deployment/v2/deploy_output.json docker/deploymentOutput
mv deployment/v2/genesis.json docker/deploymentOutput
mv deployment/v2/create_rollup_output.json docker/deploymentOutput
DEV_PERIOD=1 docker-compose -f docker/docker-compose.yml down
docker build -t hermeznetwork/geth-zkevm-contracts -f docker/Dockerfile .
sudo mv deployment/v2/deploy_output.json docker/deploymentOutput
sudo mv deployment/v2/genesis.json docker/deploymentOutput
sudo mv deployment/v2/create_rollup_output.json docker/deploymentOutput
sudo DEV_PERIOD=1 docker-compose -f docker/docker-compose.yml down
sudo docker build -t hermeznetwork/geth-zkevm-contracts -f docker/Dockerfile .
# Let it readable for the multiplatform build coming later!
sudo chmod -R go+rxw docker/gethData
12 changes: 6 additions & 6 deletions docker/scripts/v2/deploy-dockerv2.sh
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
#!/bin/bash
sudo rm -rf docker/gethData/geth_data
DEV_PERIOD=1 docker compose -f docker/docker-compose.yml up -d geth
sudo DEV_PERIOD=1 docker compose -f docker/docker-compose.yml up -d geth
sleep 5
node docker/scripts/fund-accounts.js
cp docker/scripts/v2/deploy_parameters_docker.json deployment/v2/deploy_parameters.json
cp docker/scripts/v2/create_rollup_parameters_docker.json deployment/v2/create_rollup_parameters.json
npm run deploy:testnet:v2:localhost
mkdir docker/deploymentOutput
mv deployment/v2/deploy_output.json docker/deploymentOutput
mv deployment/v2/genesis.json docker/deploymentOutput
mv deployment/v2/create_rollup_output.json docker/deploymentOutput
DEV_PERIOD=1 docker compose -f docker/docker-compose.yml down
docker build -t hermeznetwork/geth-zkevm-contracts -f docker/Dockerfile .
sudo mv deployment/v2/deploy_output.json docker/deploymentOutput
sudo mv deployment/v2/genesis.json docker/deploymentOutput
sudo mv deployment/v2/create_rollup_output.json docker/deploymentOutput
sudo DEV_PERIOD=1 docker compose -f docker/docker-compose.yml down
sudo docker build -t hermeznetwork/geth-zkevm-contracts -f docker/Dockerfile .
# Let it readable for the multiplatform build coming later!
sudo chmod -R go+rxw docker/gethData
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,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/v2/deploy-docker.sh",
"dockerv2:contracts": "sudo ./docker/scripts/v2/deploy-dockerv2.sh",
"dockerv2:contracts": "./docker/scripts/v2/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 --testfiles \"test/contractsv2/*.ts\"",
Expand Down Expand Up @@ -111,4 +111,4 @@
"verify:upgradeV2:mainnet": "npx hardhat run upgrade/upgradeToV2/verifyContracts.ts --network mainnet",
"saveUpgradeV2:mainnet": "mkdir -p upgrade/upgradeToV2/mainnet_$(date +%s) && cp -r upgrade/upgradeToV2/upgrade_*.json upgrade/upgradeToV2/mainnet_$(date +%s) && cp -r upgrade/upgradeToV2/deploy_*.json upgrade/upgradeToV2/mainnet_$(date +%s) && cp .openzeppelin/mainnet.json upgrade/upgradeToV2/mainnet_$(date +%s)"
}
}
}

0 comments on commit f653902

Please sign in to comment.