diff options
author | Jacob Evans <jacob@dekz.net> | 2018-12-24 10:14:16 +0800 |
---|---|---|
committer | Jacob Evans <jacob@dekz.net> | 2018-12-24 10:14:16 +0800 |
commit | bcd20081d39b2d00150fc6d67e2c481b23d03b48 (patch) | |
tree | 44e217a1c91142666b46c82fff3e624b1b3e9e6e /packages/migrations | |
parent | 2a577e04750f9f90f72f763b45232dd9b5a35d93 (diff) | |
download | dexon-sol-tools-bcd20081d39b2d00150fc6d67e2c481b23d03b48.tar dexon-sol-tools-bcd20081d39b2d00150fc6d67e2c481b23d03b48.tar.gz dexon-sol-tools-bcd20081d39b2d00150fc6d67e2c481b23d03b48.tar.bz2 dexon-sol-tools-bcd20081d39b2d00150fc6d67e2c481b23d03b48.tar.lz dexon-sol-tools-bcd20081d39b2d00150fc6d67e2c481b23d03b48.tar.xz dexon-sol-tools-bcd20081d39b2d00150fc6d67e2c481b23d03b48.tar.zst dexon-sol-tools-bcd20081d39b2d00150fc6d67e2c481b23d03b48.zip |
Use new bucket, bind on 0.0.0.0
Diffstat (limited to 'packages/migrations')
-rw-r--r-- | packages/migrations/Dockerfile | 8 | ||||
-rw-r--r-- | packages/migrations/package.json | 6 |
2 files changed, 8 insertions, 6 deletions
diff --git a/packages/migrations/Dockerfile b/packages/migrations/Dockerfile index ce4d6e867..12f2eaa0c 100644 --- a/packages/migrations/Dockerfile +++ b/packages/migrations/Dockerfile @@ -3,11 +3,13 @@ FROM mhart/alpine-node:10 WORKDIR /usr/src/app RUN npm install -g ganache-cli@6.1.6 -COPY 0x_ganache_snapshot ./0x_ganache_snapshot ENV MNEMONIC "concert load couple harbor equip island argue ramp clarify fence smart topic" ENV NETWORK_ID 50 - +ENV VERSION "2.2.2" +ENV SNAPSHOT_HOST "http://ganache-snapshots.0x.org.s3-website.us-east-2.amazonaws.com" +ENV SNAPSHOT_NAME "0x_ganache_snapshot" EXPOSE 8545 -CMD [ "sh", "-c", "ganache-cli --gasLimit 10000000 --db 0x_ganache_snapshot --noVMErrorsOnRPCResponse -p 8545 --networkId \"$NETWORK_ID\" -m \"$MNEMONIC\""] + +CMD [ "sh", "-c", "wget $SNAPSHOT_HOST/$SNAPSHOT_NAME-$VERSION.zip -O snapshot.zip && unzip snapshot.zip && ganache-cli --gasLimit 10000000 --db $SNAPSHOT_NAME --noVMErrorsOnRPCResponse -p 8545 --networkId \"$NETWORK_ID\" -m \"$MNEMONIC\" -h 0.0.0.0"] diff --git a/packages/migrations/package.json b/packages/migrations/package.json index 32d61a857..0f91c2972 100644 --- a/packages/migrations/package.json +++ b/packages/migrations/package.json @@ -17,13 +17,13 @@ "script:migrate:v2": "node ./lib/migrate.js", "script:migrate:v2:snapshot": "node ./lib/migrate_snapshot.js", "docs:json": "typedoc --excludePrivate --excludeExternals --target ES5 --tsconfig typedoc-tsconfig.json --json $JSON_FILE_PATH $PROJECT_FILES", - "build:snapshot": "rm -rf ${npm_package_config_snapshot_name} && yarn migrate:v2:snapshot && zip -r \"$(git rev-parse HEAD).zip\" ${npm_package_config_snapshot_name}", + "build:snapshot": "rm -rf ${npm_package_config_snapshot_name} && yarn migrate:v2:snapshot && zip -r \"${npm_package_config_snapshot_name}-${npm_package_version}.zip\" ${npm_package_config_snapshot_name}", "build:snapshot:docker": "docker build --tag ${npm_package_config_docker_snapshot_name}:${npm_package_version} --tag ${npm_package_config_docker_snapshot_name}:latest .", - "publish:snapshot": "aws s3 cp $(git rev-parse HEAD).zip ${npm_package_config_s3_snapshot_bucket}", + "publish:snapshot": "aws s3 cp ${npm_package_config_snapshot_name}-${npm_package_version}.zip ${npm_package_config_s3_snapshot_bucket}", "publish:snapshot:docker": "docker push ${npm_package_config_docker_snapshot_name}:latest" }, "config": { - "s3_snapshot_bucket": "s3://testrpc-snapshots", + "s3_snapshot_bucket": "s3://ganache-snapshots.0x.org", "docker_snapshot_name": "0xorg/ganache-cli", "snapshot_name": "0x_ganache_snapshot", "postpublish": { |