From acf3877caa617e233f6c0ffb5537fb0bfe6016a1 Mon Sep 17 00:00:00 2001 From: David Boreham Date: Sun, 6 Nov 2022 17:17:48 -0700 Subject: [PATCH] Working container build --- .../cerc-watcher-mobymask/Dockerfile | 19 +++++++++++++++++-- .../cerc-watcher-mobymask/build.sh | 3 ++- repository-list.txt | 2 ++ 3 files changed, 21 insertions(+), 3 deletions(-) diff --git a/container-build/cerc-watcher-mobymask/Dockerfile b/container-build/cerc-watcher-mobymask/Dockerfile index fd3e66d..48cf124 100644 --- a/container-build/cerc-watcher-mobymask/Dockerfile +++ b/container-build/cerc-watcher-mobymask/Dockerfile @@ -1,8 +1,23 @@ # TODO: move this into the cerc-io/mobymask-watcher repo FROM node:16.17.1-alpine3.16 +RUN apk --update --no-cache add git python3 alpine-sdk + WORKDIR /app -COPY . . +COPY assemblyscript assemblyscript +COPY watcher-ts watcher-ts -RUN apk --update --no-cache add git && yarn && yarn build +# TODO: needs branch ng-integrate-asyncify +# TODO: why are we mixing npm and yarn below? +RUN echo "Building assemblyscript" && \ + cd assemblyscript && \ + npm install && npm run build && yarn link + +# TODO: needs branch v0.2.13 +RUN echo "Building watcher-ts" && \ + cd watcher-ts/packages/graph-node && yarn remove @vulcanize/assemblyscript && \ + yarn add https://github.com/vulcanize/assemblyscript.git#ng-integrate-asyncify && \ + cd ../../../watcher-ts && yarn && yarn link "@vulcanize/assemblyscript" && yarn build + +WORKDIR /app/watcher-ts/packages/mobymask-watcher diff --git a/container-build/cerc-watcher-mobymask/build.sh b/container-build/cerc-watcher-mobymask/build.sh index 74782c9..a4a97cd 100755 --- a/container-build/cerc-watcher-mobymask/build.sh +++ b/container-build/cerc-watcher-mobymask/build.sh @@ -4,4 +4,5 @@ # See: https://stackoverflow.com/a/246128/1701505 SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) -docker build -t cerc/watcher-mobymask:local -f ${SCRIPT_DIR}/Dockerfile ${CERC_REPO_BASE_DIR}/mobymask-watcher +# 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} diff --git a/repository-list.txt b/repository-list.txt index 97dfb41..6bc5970 100644 --- a/repository-list.txt +++ b/repository-list.txt @@ -10,3 +10,5 @@ vulcanize/ipld-eth-beacon-db cerc-io/laconicd cerc-io/laconic-cns-cli cerc-io/mobymask-watcher +cerc-io/watcher-ts +vulcanize/assemblyscript