diff --git a/dao/Dockerfile b/dao/Dockerfile index 17616e5..2359803 100644 --- a/dao/Dockerfile +++ b/dao/Dockerfile @@ -1,7 +1,9 @@ -FROM node:6 +FROM node:latest -WORKDIR /code +WORKDIR /dao +RUN npm install -g truffle -ADD . /code +ADD . /dao -RUN npm install -g truffle +RUN npm install +RUN npm install zeppelin-solidity diff --git a/dao/README.md b/dao/README.md index 927f6e3..e826e25 100644 --- a/dao/README.md +++ b/dao/README.md @@ -21,9 +21,9 @@ npm i -g truffle ### Ethereum You can choose between Parity or local testrpc -### testRPC +### ganache (formerly testrpc) ```bash -npm install -g ethereumjs-testrpc +npm install -g ganache-cli ``` ### Parity diff --git a/dao/dao.sh b/dao/dao.sh index 880d523..85f73da 100755 --- a/dao/dao.sh +++ b/dao/dao.sh @@ -9,13 +9,14 @@ case "$1" in noop) ;; +bash) + /bin/bash + ;; + run) - cd /dao - npm install zeppelin-solidity - npm install truffle-hdwallet-provider truffle compile-all truffle migrate --reset -# truffle test + truffle test ;; *) echo 'No operation specified' diff --git a/dao/package.json b/dao/package.json index 0069aa9..f31895a 100644 --- a/dao/package.json +++ b/dao/package.json @@ -12,7 +12,8 @@ "author": "tiero", "license": "MIT", "dependencies": { - "ethereumjs-testrpc": "^4.1.3", + "ganache-cli": "^6.0.3", + "scrypt": "^6.0.3", "truffle-hdwallet-provider": "0.0.3", "zeppelin-solidity": "^1.3.0" } diff --git a/dao/truffle.js b/dao/truffle.js index 8a00644..cf7960f 100644 --- a/dao/truffle.js +++ b/dao/truffle.js @@ -5,7 +5,7 @@ const host = "http://localhost:8545"//NODE module.exports = { networks: { development: { - host: "localhost", + host: "testrpc", port: 8545, network_id: "*" // Match any network id }, @@ -17,4 +17,4 @@ module.exports = { network_id: "*" // Match any network id } }, -} \ No newline at end of file +} diff --git a/docker-compose.dao.yml b/docker-compose.dao.yml index fb96893..22063da 100644 --- a/docker-compose.dao.yml +++ b/docker-compose.dao.yml @@ -16,4 +16,4 @@ services: - "8545:8545" - "8546:8546" - "30303:30303" - command: testrpc + command: ganache-cli diff --git a/testrpc/Dockerfile b/testrpc/Dockerfile index ea573b8..eec83aa 100644 --- a/testrpc/Dockerfile +++ b/testrpc/Dockerfile @@ -2,4 +2,4 @@ FROM node:6 WORKDIR /code -RUN npm install -g ethereumjs-testrpc +RUN npm install -g ganache-cli diff --git a/tools.sh b/tools.sh index 979a072..79c5a73 100755 --- a/tools.sh +++ b/tools.sh @@ -85,9 +85,8 @@ testrpc) ;; prepare-dao) - docker-compose -f docker-compose.dao.yml create --build --force-recreate testrpc docker-compose -f docker-compose.dao.yml create --build --force-recreate dao - docker-compose -f docker-compose.dao.yml run --service-ports dao ./dao.sh run + docker-compose -f docker-compose.dao.yml run --service-ports dao ./dao.sh $2 ;; ipfs)