Fixed problem with redeployment, mounting built contracts in deploy containers was the problem. Deleted Migrations contracts from repo.
This commit is contained in:
parent
3098b0ef80
commit
a35cfc8a48
|
@ -41,7 +41,7 @@ cd ../src/deploy/deploy-test
|
||||||
echo "Building deploy docker image"
|
echo "Building deploy docker image"
|
||||||
docker build -t deploy_test . > /dev/null 2>&1
|
docker build -t deploy_test . > /dev/null 2>&1
|
||||||
echo "Deploying"
|
echo "Deploying"
|
||||||
docker run --network blockchain_home --rm --env-file .env -v "$(pwd)/build:/build/build" deploy_test --network development --reset > /dev/null 2>&1
|
docker run --network blockchain_home --rm --env-file .env deploy_test --network development --reset > /dev/null 2>&1
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -52,7 +52,7 @@ cd ../deploy-home
|
||||||
echo "Building deploy docker image"
|
echo "Building deploy docker image"
|
||||||
docker build -t deploy_home . > /dev/null 2>&1
|
docker build -t deploy_home . > /dev/null 2>&1
|
||||||
echo "Deploying"
|
echo "Deploying"
|
||||||
docker run --network blockchain_home --rm --env-file .env -v "$(pwd)/build:/build/build" deploy_home --network development --reset > /dev/null 2>&1
|
docker run --network blockchain_home --rm --env-file .env deploy_home --network development --reset > /dev/null 2>&1
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -63,7 +63,7 @@ cd ../deploy-side
|
||||||
echo "Building deploy docker image"
|
echo "Building deploy docker image"
|
||||||
docker build -t deploy_side . > /dev/null 2>&1
|
docker build -t deploy_side . > /dev/null 2>&1
|
||||||
echo "Deploying"
|
echo "Deploying"
|
||||||
docker run --network blockchain_side --rm --env-file .env -v "$(pwd)/build:/build/build" deploy_side --network development --reset > /dev/null 2>&1
|
docker run --network blockchain_side --rm --env-file .env deploy_side --network development --reset > /dev/null 2>&1
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -10,6 +10,15 @@ RUN npm install truffle-hdwallet-provider
|
||||||
RUN truffle obtain --solc 0.5.9
|
RUN truffle obtain --solc 0.5.9
|
||||||
|
|
||||||
COPY truffle-config-build.js /build/truffle-config.js
|
COPY truffle-config-build.js /build/truffle-config.js
|
||||||
|
|
||||||
|
RUN mkdir temp \
|
||||||
|
&& cd temp \
|
||||||
|
&& truffle init \
|
||||||
|
&& mkdir ../contracts \
|
||||||
|
&& cp ./contracts/Migrations.sol ../contracts/Migrations.sol \
|
||||||
|
&& cd .. \
|
||||||
|
&& rm -rf temp
|
||||||
|
|
||||||
COPY contracts/openzeppelin-solidity /build/contracts/openzeppelin-solidity
|
COPY contracts/openzeppelin-solidity /build/contracts/openzeppelin-solidity
|
||||||
|
|
||||||
RUN truffle compile
|
RUN truffle compile
|
||||||
|
|
|
@ -1,24 +0,0 @@
|
||||||
pragma solidity ^0.5.9;
|
|
||||||
|
|
||||||
contract Migrations {
|
|
||||||
address public owner;
|
|
||||||
|
|
||||||
uint public last_completed_migration;
|
|
||||||
|
|
||||||
modifier restricted() {
|
|
||||||
if (msg.sender == owner) _;
|
|
||||||
}
|
|
||||||
|
|
||||||
constructor() public {
|
|
||||||
owner = msg.sender;
|
|
||||||
}
|
|
||||||
|
|
||||||
function setCompleted(uint completed) restricted public {
|
|
||||||
last_completed_migration = completed;
|
|
||||||
}
|
|
||||||
|
|
||||||
function upgrade(address new_address) restricted public {
|
|
||||||
Migrations upgraded = Migrations(new_address);
|
|
||||||
upgraded.setCompleted(last_completed_migration);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,5 +0,0 @@
|
||||||
const Migrations = artifacts.require('Migrations')
|
|
||||||
|
|
||||||
module.exports = deployer => {
|
|
||||||
deployer.deploy(Migrations)
|
|
||||||
}
|
|
|
@ -10,6 +10,15 @@ RUN npm install truffle-hdwallet-provider
|
||||||
RUN truffle obtain --solc 0.5.9
|
RUN truffle obtain --solc 0.5.9
|
||||||
|
|
||||||
COPY truffle-config-build.js /build/truffle-config.js
|
COPY truffle-config-build.js /build/truffle-config.js
|
||||||
|
|
||||||
|
RUN mkdir temp \
|
||||||
|
&& cd temp \
|
||||||
|
&& truffle init \
|
||||||
|
&& mkdir ../contracts \
|
||||||
|
&& cp ./contracts/Migrations.sol ../contracts/Migrations.sol \
|
||||||
|
&& cd .. \
|
||||||
|
&& rm -rf temp
|
||||||
|
|
||||||
COPY contracts /build/contracts
|
COPY contracts /build/contracts
|
||||||
|
|
||||||
RUN truffle compile
|
RUN truffle compile
|
||||||
|
|
|
@ -1,24 +0,0 @@
|
||||||
pragma solidity ^0.5.9;
|
|
||||||
|
|
||||||
contract Migrations {
|
|
||||||
address public owner;
|
|
||||||
|
|
||||||
uint public last_completed_migration;
|
|
||||||
|
|
||||||
modifier restricted() {
|
|
||||||
if (msg.sender == owner) _;
|
|
||||||
}
|
|
||||||
|
|
||||||
constructor() public {
|
|
||||||
owner = msg.sender;
|
|
||||||
}
|
|
||||||
|
|
||||||
function setCompleted(uint completed) restricted public {
|
|
||||||
last_completed_migration = completed;
|
|
||||||
}
|
|
||||||
|
|
||||||
function upgrade(address new_address) restricted public {
|
|
||||||
Migrations upgraded = Migrations(new_address);
|
|
||||||
upgraded.setCompleted(last_completed_migration);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,5 +0,0 @@
|
||||||
const Migrations = artifacts.require('Migrations')
|
|
||||||
|
|
||||||
module.exports = deployer => {
|
|
||||||
deployer.deploy(Migrations)
|
|
||||||
}
|
|
|
@ -10,6 +10,15 @@ RUN npm install truffle-hdwallet-provider
|
||||||
RUN truffle obtain --solc 0.5.9
|
RUN truffle obtain --solc 0.5.9
|
||||||
|
|
||||||
COPY truffle-config-build.js /build/truffle-config.js
|
COPY truffle-config-build.js /build/truffle-config.js
|
||||||
|
|
||||||
|
RUN mkdir temp \
|
||||||
|
&& cd temp \
|
||||||
|
&& truffle init \
|
||||||
|
&& mkdir ../contracts \
|
||||||
|
&& cp ./contracts/Migrations.sol ../contracts/Migrations.sol \
|
||||||
|
&& cd .. \
|
||||||
|
&& rm -rf temp
|
||||||
|
|
||||||
COPY contracts/openzeppelin-solidity /build/contracts/openzeppelin-solidity
|
COPY contracts/openzeppelin-solidity /build/contracts/openzeppelin-solidity
|
||||||
|
|
||||||
RUN truffle compile
|
RUN truffle compile
|
||||||
|
|
|
@ -1,24 +0,0 @@
|
||||||
pragma solidity ^0.5.9;
|
|
||||||
|
|
||||||
contract Migrations {
|
|
||||||
address public owner;
|
|
||||||
|
|
||||||
uint public last_completed_migration;
|
|
||||||
|
|
||||||
modifier restricted() {
|
|
||||||
if (msg.sender == owner) _;
|
|
||||||
}
|
|
||||||
|
|
||||||
constructor() public {
|
|
||||||
owner = msg.sender;
|
|
||||||
}
|
|
||||||
|
|
||||||
function setCompleted(uint completed) restricted public {
|
|
||||||
last_completed_migration = completed;
|
|
||||||
}
|
|
||||||
|
|
||||||
function upgrade(address new_address) restricted public {
|
|
||||||
Migrations upgraded = Migrations(new_address);
|
|
||||||
upgraded.setCompleted(last_completed_migration);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,5 +0,0 @@
|
||||||
const Migrations = artifacts.require('Migrations')
|
|
||||||
|
|
||||||
module.exports = deployer => {
|
|
||||||
deployer.deploy(Migrations)
|
|
||||||
}
|
|
Loading…
Reference in New Issue