Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add contracts and other files inside the docker image #10

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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"]

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
7 changes: 7 additions & 0 deletions start.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/sh

NETWORK=${NETWORK:-development}

echo $NETWORK

npx hardhat run scripts/deploy.ts --network $NETWORK