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
|
||||
command: ["sh", "-c", "yarn server"]
|
||||
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:
|
||||
- "0.0.0.0:3001:3001"
|
||||
- "0.0.0.0:9001:9001"
|
||||
@ -55,13 +55,11 @@ services:
|
||||
image: cerc/watcher-mobymask:local
|
||||
command: ["sh", "-c", "yarn job-runner"]
|
||||
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:
|
||||
- "0.0.0.0:9000:9000"
|
||||
extra_hosts:
|
||||
- "ipld-eth-server:host-gateway"
|
||||
|
||||
volumes:
|
||||
indexer_db_data:
|
||||
watcher_db_data:
|
||||
|
@ -5,23 +5,10 @@ RUN apk --update --no-cache add git python3 alpine-sdk
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY assemblyscript assemblyscript
|
||||
COPY watcher-ts watcher-ts
|
||||
COPY . .
|
||||
|
||||
# TODO: needs branch ng-integrate-asyncify
|
||||
# We use a mixture of npm and yarn below because the upstream
|
||||
# project checked in an npm package-log.json file
|
||||
RUN echo "Building assemblyscript" && \
|
||||
cd assemblyscript && \
|
||||
npm install && npm run build && yarn link
|
||||
RUN echo "Building watcher-ts" && \
|
||||
git checkout v0.2.19 && \
|
||||
yarn && yarn build
|
||||
|
||||
# TODO: needs branch v0.2.13
|
||||
# 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
|
||||
WORKDIR /app/packages/mobymask-watcher
|
||||
|
@ -4,5 +4,6 @@
|
||||
# See: https://stackoverflow.com/a/246128/1701505
|
||||
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}
|
||||
docker build -t cerc/watcher-mobymask:local -f ${SCRIPT_DIR}/Dockerfile ${CERC_REPO_BASE_DIR}/watcher-ts
|
||||
|
||||
# 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).
|
||||
## Clone required repositories
|
||||
```
|
||||
$ laconic-so setup-repositories --include vulcanize/assemblyscript,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
|
||||
$ laconic-so setup-repositories --include cerc-io/watcher-ts
|
||||
```
|
||||
## 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.
|
||||
## 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:
|
||||
```
|
||||
$ 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).
|
||||
|
@ -1,8 +1,7 @@
|
||||
version: "1.0"
|
||||
name: mobymask-watcher
|
||||
repos:
|
||||
- cerc-io/watcher-ts/v0.2.13
|
||||
- vulcanize/assemblyscript/ng-integrate-asyncify
|
||||
- cerc-io/watcher-ts/v0.2.19
|
||||
containers:
|
||||
- cerc/watcher-mobymask
|
||||
pods:
|
||||
|
Loading…
Reference in New Issue
Block a user