diff --git a/Dockerfile b/Dockerfile index 234eba6..7850f18 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,7 +12,13 @@ RUN npm -g config set user root RUN apk update && apk add --no-cache git COPY package.json ./ +COPY contracts /hardhat/contracts +COPY scripts /hardhat/scripts +COPY tasks /hardhat/tasks +COPY hardhat.config.ts /hardhat/hardhat.config.ts +COPY utils.ts /hardhat/utils.ts + RUN npm install -ENTRYPOINT ["npm", "start"] +ENTRYPOINT ["npm", "start:docker"] diff --git a/package.json b/package.json index 9c0ed51..449de19 100644 --- a/package.json +++ b/package.json @@ -44,6 +44,7 @@ }, "scripts": { "start": "npx hardhat run scripts/deploy.ts --network development", + "start:docker": "./start.sh", "build": "tsc", "upload": "NODE_TLS_REJECT_UNAUTHORIZED=0 node dist/scripts/upload.js", "fix": "eslint --ext .js --ext .ts --fix ./scripts", diff --git a/start.sh b/start.sh new file mode 100755 index 0000000..dd9ea45 --- /dev/null +++ b/start.sh @@ -0,0 +1,7 @@ +#!/bin/sh + +NETWORK=${NETWORK:-development} + +echo $NETWORK + +npx hardhat run scripts/deploy.ts --network $NETWORK \ No newline at end of file