Skip to content

Commit 005f78a

Browse files
committed
refactor: build blockchain node using pulled repo
1 parent 0ba6c9e commit 005f78a

File tree

2 files changed

+14
-9
lines changed

2 files changed

+14
-9
lines changed

packages/examples/cvat/recording-oracle/docker-compose.test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ services:
1515

1616
blockchain-node:
1717
build:
18-
context: ./
19-
dockerfile: dockerfiles/blockchain-node.Dockerfile
18+
context: ../../../../
19+
dockerfile: packages/examples/cvat/recording-oracle/dockerfiles/blockchain-node.Dockerfile
2020
healthcheck:
2121
# Using a magic nubmer of 23 here because this is a block number when blockchain-node container is ready to use
2222
test: if [ $(( $(wget -q --post-data='{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}' -O- http://blockchain-node:8545 | grep -o '"result":"[^"]*"' | awk -F'"' '{print $4}' ) )) -ge 23 ]; then exit 0; else exit 1; fi
Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
1-
FROM node:18-alpine
1+
# TODO: make this shared and part of local setup
2+
FROM node:18-slim
23

3-
RUN apk add git
4+
WORKDIR /usr/src/app
45

5-
RUN git clone https://github.com/humanprotocol/human-protocol.git
6-
7-
WORKDIR /human-protocol
6+
# Copy expected yarn dist
7+
COPY .yarn ./.yarn
8+
COPY .yarnrc ./
9+
# Copy files for deps installation
10+
COPY package.json yarn.lock ./
811

12+
COPY tsconfig.json ./
13+
COPY packages/core ./packages/core
14+
RUN yarn workspace @human-protocol/core install --ignore-scripts
915
EXPOSE 8545
1016

11-
RUN yarn workspace @human-protocol/core install --ignore-scripts
12-
CMD yarn workspace @human-protocol/core local
17+
CMD yarn workspace @human-protocol/core local

0 commit comments

Comments
 (0)