add relayer Dockerfile

This commit is contained in:
Andrea Franz 2020-06-23 17:33:44 +02:00
parent 6a93ad468b
commit 712ebc1b34
No known key found for this signature in database
GPG Key ID: 4F0D2F2D9DE7F29D
4 changed files with 27 additions and 1 deletions

7
.dockerignore Normal file
View File

@ -0,0 +1,7 @@
/.git
/.embark
/yarn-error.log
/dist
/build
/node_modules
/scripts/node_modules

3
.gitignore vendored
View File

@ -1,3 +1,4 @@
*keystore*
.embark .embark
chains.json chains.json
config/livenet/password config/livenet/password
@ -8,3 +9,5 @@ build
embarkArtifacts embarkArtifacts
node_modules node_modules
yarn-error.log yarn-error.log
/scripts/contracts
/src/react-app-env.d.ts

View File

@ -1,6 +1,11 @@
CONTRACTS_PATH=./contracts CONTRACTS_PATH="./contracts"
RELAYER_DOCKER_FILE="./_assets/Dockerfile.relayer"
RELAYER_DOCKER_IMAGE="redeem-relayer"
RELAYER_CONTRACTS_PATH=$$(realpath ./scripts/contracts) RELAYER_CONTRACTS_PATH=$$(realpath ./scripts/contracts)
build-relayer-image:
docker build -t $(RELAYER_DOCKER_IMAGE) -f $(RELAYER_DOCKER_FILE) .
build-relayer-contracts: build-relayer-contracts:
rm -rf $(RELAYER_CONTRACTS_PATH); \ rm -rf $(RELAYER_CONTRACTS_PATH); \
yarn run solcjs -o $(RELAYER_CONTRACTS_PATH) --bin --abi $$(find $(CONTRACTS_PATH) -name *.sol); \ yarn run solcjs -o $(RELAYER_CONTRACTS_PATH) --bin --abi $$(find $(CONTRACTS_PATH) -name *.sol); \

View File

@ -0,0 +1,11 @@
FROM node:14.4.0
WORKDIR /usr/relayer
COPY . .
RUN yarn && \
cd scripts && yarn && cd ../ \
make build-relayer-contracts
EXPOSE 3000