Browse Source

refactor: use env vars during migration in docker image

develop
Apostolos Fanakis 4 years ago
parent
commit
99d4db9753
  1. 4
      docker/concordia-contracts/migrate.sh
  2. 3
      packages/concordia-contracts/package.json

4
docker/concordia-contracts/migrate.sh

@ -3,4 +3,6 @@
export CHAIN_HOST="$DEPLOY_CHAIN_HOST" export CHAIN_HOST="$DEPLOY_CHAIN_HOST"
export CHAIN_PORT="$DEPLOY_CHAIN_PORT" export CHAIN_PORT="$DEPLOY_CHAIN_PORT"
cd /usr/src/concordia/packages/concordia-contracts && yarn _migrate --network "${MIGRATE_NETWORK}" --reset && yarn upload cd /usr/src/concordia/packages/concordia-contracts &&
yarn _migrate --network "${MIGRATE_NETWORK}" --reset &&
yarn _upload ${CONTRACTS_VERSION_HASH} ${CONTRACTS_VERSION_TAG}

3
packages/concordia-contracts/package.json

@ -15,7 +15,8 @@
"migrate-upload": "yarn _migrate --network develop && yarn upload", "migrate-upload": "yarn _migrate --network develop && yarn upload",
"migrate-reset-upload": "yarn _migrate --network develop --reset && yarn upload", "migrate-reset-upload": "yarn _migrate --network develop --reset && yarn upload",
"_migrate": "yarn truffle migrate", "_migrate": "yarn truffle migrate",
"upload": "node ./utils/contractsProviderUtils.js ${npm_package_version}-dev latest" "upload": "yarn _upload ${npm_package_version}-dev latest",
"_upload": "node ./utils/contractsProviderUtils.js"
}, },
"dependencies": { "dependencies": {
"@openzeppelin/contracts": "~3.3.0", "@openzeppelin/contracts": "~3.3.0",

Loading…
Cancel
Save