Update stack to run azimuth job runner
This commit is contained in:
parent
87bedde5cb
commit
b27dbbc1ca
@ -22,6 +22,24 @@ services:
|
|||||||
retries: 15
|
retries: 15
|
||||||
start_period: 10s
|
start_period: 10s
|
||||||
|
|
||||||
|
# Starts the azimuth-watcher job runner
|
||||||
|
azimuth-watcher-job-runner:
|
||||||
|
image: cerc/watcher-azimuth:local
|
||||||
|
restart: unless-stopped
|
||||||
|
depends_on:
|
||||||
|
watcher-db:
|
||||||
|
condition: service_healthy
|
||||||
|
environment:
|
||||||
|
CERC_SCRIPT_DEBUG: ${CERC_SCRIPT_DEBUG}
|
||||||
|
CERC_IPLD_ETH_RPC: ${CERC_IPLD_ETH_RPC}
|
||||||
|
CERC_IPLD_ETH_GQL: ${CERC_IPLD_ETH_GQL}
|
||||||
|
working_dir: /app/packages/azimuth-watcher
|
||||||
|
command: "./start-job-runner.sh"
|
||||||
|
volumes:
|
||||||
|
- ../config/watcher-azimuth/watcher-config-template.toml:/app/packages/azimuth-watcher/environments/watcher-config-template.toml
|
||||||
|
- ../config/watcher-azimuth/merge-toml.js:/app/packages/azimuth-watcher/merge-toml.js
|
||||||
|
- ../config/watcher-azimuth/start-job-runner.sh:/app/packages/azimuth-watcher/start-job-runner.sh
|
||||||
|
|
||||||
# Starts the azimuth-watcher server
|
# Starts the azimuth-watcher server
|
||||||
azimuth-watcher-server:
|
azimuth-watcher-server:
|
||||||
image: cerc/watcher-azimuth:local
|
image: cerc/watcher-azimuth:local
|
||||||
|
@ -0,0 +1,26 @@
|
|||||||
|
set -e
|
||||||
|
if [ -n "$CERC_SCRIPT_DEBUG" ]; then
|
||||||
|
set -x
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Using IPLD ETH RPC endpoint ${CERC_IPLD_ETH_RPC}"
|
||||||
|
echo "Using IPLD GQL endpoint ${CERC_IPLD_ETH_GQL}"
|
||||||
|
|
||||||
|
# Replace env variables in template TOML file
|
||||||
|
# Read in the config template TOML file and modify it
|
||||||
|
WATCHER_CONFIG_TEMPLATE=$(cat environments/watcher-config-template.toml)
|
||||||
|
WATCHER_CONFIG=$(echo "$WATCHER_CONFIG_TEMPLATE" | \
|
||||||
|
sed -E "s|REPLACE_WITH_CERC_IPLD_ETH_RPC|${CERC_IPLD_ETH_RPC}|g; \
|
||||||
|
s|REPLACE_WITH_CERC_IPLD_ETH_GQL|${CERC_IPLD_ETH_GQL}| ")
|
||||||
|
|
||||||
|
# Write the modified content to a new file
|
||||||
|
echo "$WATCHER_CONFIG" > environments/watcher-config.toml
|
||||||
|
|
||||||
|
# Merge SO watcher config with existing config file
|
||||||
|
node merge-toml.js
|
||||||
|
|
||||||
|
echo 'yarn job-runner'
|
||||||
|
|
||||||
|
yarn watch:contract --address 0x223c067F8CF28ae173EE5CafEa60cA44C335fecB --kind Azimuth --checkpoint true --starting-block 6784880
|
||||||
|
yarn yarn job-runner
|
||||||
|
|
@ -12,3 +12,4 @@
|
|||||||
[upstream.ethServer]
|
[upstream.ethServer]
|
||||||
gqlApiEndpoint = "REPLACE_WITH_CERC_IPLD_ETH_GQL"
|
gqlApiEndpoint = "REPLACE_WITH_CERC_IPLD_ETH_GQL"
|
||||||
rpcProviderEndpoint = "REPLACE_WITH_CERC_IPLD_ETH_RPC"
|
rpcProviderEndpoint = "REPLACE_WITH_CERC_IPLD_ETH_RPC"
|
||||||
|
rpcClient = true
|
@ -15,14 +15,6 @@ laconic-so --stack azimuth setup-repositories
|
|||||||
NOTE: If the repository already exists and checked out to a different version, `setup-repositories` command will throw an error.
|
NOTE: If the repository already exists and checked out to a different version, `setup-repositories` command will throw an error.
|
||||||
For getting around this, the `azimuth-watcher-ts` repository can be removed and then run the command.
|
For getting around this, the `azimuth-watcher-ts` repository can be removed and then run the command.
|
||||||
|
|
||||||
Checkout to the required versions and branches in repos
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# azimuth-watcher-ts
|
|
||||||
cd ~/cerc/azimuth-watcher-ts
|
|
||||||
git checkout v0.1.0
|
|
||||||
```
|
|
||||||
|
|
||||||
Build the container images:
|
Build the container images:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
version: "1.0"
|
version: "1.0"
|
||||||
name: azimuth
|
name: azimuth
|
||||||
repos:
|
repos:
|
||||||
- github.com/cerc-io/azimuth-watcher-ts@v0.1.1
|
- github.com/cerc-io/azimuth-watcher-ts
|
||||||
containers:
|
containers:
|
||||||
- cerc/watcher-azimuth
|
- cerc/watcher-azimuth
|
||||||
pods:
|
pods:
|
||||||
|
Loading…
Reference in New Issue
Block a user