Upgrade watcher-ts version in mobymask setup
This commit is contained in:
parent
d51508b01d
commit
aa37d1f11a
@ -32,7 +32,7 @@ services:
|
|||||||
image: cerc/watcher-mobymask:local
|
image: cerc/watcher-mobymask:local
|
||||||
command: ["sh", "-c", "yarn server"]
|
command: ["sh", "-c", "yarn server"]
|
||||||
volumes:
|
volumes:
|
||||||
- ../config/watcher-mobymask/mobymask-watcher.toml:/app/watcher-ts/packages/mobymask-watcher/environments/local.toml
|
- ../config/watcher-mobymask/mobymask-watcher.toml:/app/packages/mobymask-watcher/environments/local.toml
|
||||||
ports:
|
ports:
|
||||||
- "0.0.0.0:3001:3001"
|
- "0.0.0.0:3001:3001"
|
||||||
- "0.0.0.0:9001:9001"
|
- "0.0.0.0:9001:9001"
|
||||||
@ -55,13 +55,11 @@ services:
|
|||||||
image: cerc/watcher-mobymask:local
|
image: cerc/watcher-mobymask:local
|
||||||
command: ["sh", "-c", "yarn job-runner"]
|
command: ["sh", "-c", "yarn job-runner"]
|
||||||
volumes:
|
volumes:
|
||||||
- ../config/watcher-mobymask/mobymask-watcher.toml:/app/watcher-ts/packages/mobymask-watcher/environments/local.toml
|
- ../config/watcher-mobymask/mobymask-watcher.toml:/app/packages/mobymask-watcher/environments/local.toml
|
||||||
ports:
|
ports:
|
||||||
- "0.0.0.0:9000:9000"
|
- "0.0.0.0:9000:9000"
|
||||||
extra_hosts:
|
extra_hosts:
|
||||||
- "ipld-eth-server:host-gateway"
|
- "ipld-eth-server:host-gateway"
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
indexer_db_data:
|
|
||||||
watcher_db_data:
|
watcher_db_data:
|
||||||
|
|
@ -5,23 +5,10 @@ RUN apk --update --no-cache add git python3 alpine-sdk
|
|||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
COPY assemblyscript assemblyscript
|
COPY . .
|
||||||
COPY watcher-ts watcher-ts
|
|
||||||
|
|
||||||
# TODO: needs branch ng-integrate-asyncify
|
RUN echo "Building watcher-ts" && \
|
||||||
# We use a mixture of npm and yarn below because the upstream
|
git checkout v0.2.19 && \
|
||||||
# project checked in an npm package-log.json file
|
yarn && yarn build
|
||||||
RUN echo "Building assemblyscript" && \
|
|
||||||
cd assemblyscript && \
|
|
||||||
npm install && npm run build && yarn link
|
|
||||||
|
|
||||||
# TODO: needs branch v0.2.13
|
WORKDIR /app/packages/mobymask-watcher
|
||||||
# The shenanigans below is due to yarn and lerna being a dumpster-fire
|
|
||||||
RUN echo "Linking watcher-ts to local assemblyscript" && \
|
|
||||||
cd watcher-ts/packages/graph-node && yarn remove @vulcanize/assemblyscript && \
|
|
||||||
yarn add https://github.com/vulcanize/assemblyscript.git#ng-integrate-asyncify
|
|
||||||
|
|
||||||
RUN echo "Building watcher-tst" && \
|
|
||||||
cd watcher-ts && yarn && yarn link "@vulcanize/assemblyscript" && yarn build
|
|
||||||
|
|
||||||
WORKDIR /app/watcher-ts/packages/mobymask-watcher
|
|
||||||
|
@ -4,5 +4,6 @@
|
|||||||
# See: https://stackoverflow.com/a/246128/1701505
|
# See: https://stackoverflow.com/a/246128/1701505
|
||||||
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
||||||
|
|
||||||
# TODO: add a mechanism to pass two repos into a container rather than the parent directory as below
|
docker build -t cerc/watcher-mobymask:local -f ${SCRIPT_DIR}/Dockerfile ${CERC_REPO_BASE_DIR}/watcher-ts
|
||||||
docker build -t cerc/watcher-mobymask:local -f ${SCRIPT_DIR}/Dockerfile ${CERC_REPO_BASE_DIR}
|
|
||||||
|
# TODO: add a mechanism to pass two repos into a container rather than the parent directory
|
||||||
|
@ -8,18 +8,11 @@ The instructions below show how to deploy a MobyMask watcher using laconic-stack
|
|||||||
This deployment expects that ipld-eth-server's endpoints are available on the local machine at http://ipld-eth-server.example.com:8083/graphql and http://ipld-eth-server.example.com:8082. More advanced configurations are supported by modifying the watcher's [config file](../../config/watcher-mobymask/mobymask-watcher.toml).
|
This deployment expects that ipld-eth-server's endpoints are available on the local machine at http://ipld-eth-server.example.com:8083/graphql and http://ipld-eth-server.example.com:8082. More advanced configurations are supported by modifying the watcher's [config file](../../config/watcher-mobymask/mobymask-watcher.toml).
|
||||||
## Clone required repositories
|
## Clone required repositories
|
||||||
```
|
```
|
||||||
$ laconic-so setup-repositories --include vulcanize/assemblyscript,cerc-io/watcher-ts
|
$ laconic-so setup-repositories --include cerc-io/watcher-ts
|
||||||
```
|
|
||||||
Checkout required branches for the current release:
|
|
||||||
```
|
|
||||||
$ cd ~/cerc/assemblyscript
|
|
||||||
$ git checkout ng-integrate-asyncify
|
|
||||||
$ cd ~/cerc/watcher-ts
|
|
||||||
$ git checkout v0.2.13
|
|
||||||
```
|
```
|
||||||
## Build the watcher container
|
## Build the watcher container
|
||||||
```
|
```
|
||||||
$ laconic-sh build-containers --include cerc/watcher-mobymask
|
$ laconic-so build-containers --include cerc/watcher-mobymask
|
||||||
```
|
```
|
||||||
This should create a container with tag `cerc/watcher-mobymask` in the local image registry.
|
This should create a container with tag `cerc/watcher-mobymask` in the local image registry.
|
||||||
## Deploy the stack
|
## Deploy the stack
|
||||||
@ -33,6 +26,6 @@ $ docker exec -i <watcher-db-container> psql -U vdbm mobymask-watcher < config/w
|
|||||||
```
|
```
|
||||||
Finally start the remaining containers:
|
Finally start the remaining containers:
|
||||||
```
|
```
|
||||||
$ laconic-so deploy-system --include watcher-mobymask
|
$ laconic-so deploy-system --include watcher-mobymask up
|
||||||
```
|
```
|
||||||
Correct operation should be verified by following the instructions [here](https://github.com/cerc-io/mobymask-watcher/tree/main/mainnet-watcher-only#run), checking GraphQL queries return valid results in the watcher's [playground](http://127.0.0.1:3001/graphql).
|
Correct operation should be verified by following the instructions [here](https://github.com/cerc-io/mobymask-watcher/tree/main/mainnet-watcher-only#run), checking GraphQL queries return valid results in the watcher's [playground](http://127.0.0.1:3001/graphql).
|
||||||
|
@ -1,8 +1,7 @@
|
|||||||
version: "1.0"
|
version: "1.0"
|
||||||
name: mobymask-watcher
|
name: mobymask-watcher
|
||||||
repos:
|
repos:
|
||||||
- cerc-io/watcher-ts/v0.2.13
|
- cerc-io/watcher-ts/v0.2.19
|
||||||
- vulcanize/assemblyscript/ng-integrate-asyncify
|
|
||||||
containers:
|
containers:
|
||||||
- cerc/watcher-mobymask
|
- cerc/watcher-mobymask
|
||||||
pods:
|
pods:
|
||||||
|
Loading…
Reference in New Issue
Block a user