Create stack for sushiswap v3 subgraph watcher #8

Merged
ashwin merged 15 commits from deep-stack/sushiswap-watcher-ts:ng-create-stack-for-sushiswap into main 2024-06-19 05:48:00 +00:00
3 changed files with 39 additions and 40 deletions
Showing only changes of commit 408e12b741 - Show all commits

View File

@ -1,17 +1,17 @@
version: '3.2'
services:
v3-watcher-db:
sushiswap-v3-watcher-db:
restart: unless-stopped
image: postgres:14-alpine
environment:
- POSTGRES_USER=vdbm
- POSTGRES_MULTIPLE_DATABASES=v3-watcher,v3-watcher-job-queue
- POSTGRES_EXTENSION=v3-watcher-job-queue:pgcrypto
- POSTGRES_MULTIPLE_DATABASES=sushiswap-v3-watcher,sushiswap-v3-watcher-job-queue
- POSTGRES_EXTENSION=sushiswap-v3-watcher-job-queue:pgcrypto
- POSTGRES_PASSWORD=password
volumes:
- ../config/postgresql/multiple-postgressql-databases.sh:/docker-entrypoint-initdb.d/multiple-postgressql-databases.sh
- v3_watcher_db_data:/var/lib/postgresql/data
- sushiswap-v3_watcher_db_data:/var/lib/postgresql/data
ports:
- "5432"
healthcheck:
@ -21,19 +21,19 @@ services:
retries: 15
start_period: 10s
v3-watcher-job-runner:
sushiswap-v3-watcher-job-runner:
restart: unless-stopped
depends_on:
v3-watcher-db:
sushiswap-v3-watcher-db:
condition: service_healthy
image: cerc/watcher-v3:local
image: cerc/watcher-sushiswap-v3:local
environment:
CERC_SCRIPT_DEBUG: ${CERC_SCRIPT_DEBUG}
CERC_ETH_RPC_ENDPOINTS: ${CERC_ETH_RPC_ENDPOINTS}
command: ["bash", "./start-job-runner.sh"]
volumes:
- ../config/watcher-v3/watcher-config-template.toml:/app/environments/watcher-config-template.toml
- ../config/watcher-v3/start-job-runner.sh:/app/start-job-runner.sh
- ../config/watcher-sushiswap-v3/watcher-config-template.toml:/app/environments/watcher-config-template.toml
- ../config/watcher-sushiswap-v3/start-job-runner.sh:/app/start-job-runner.sh
ports:
- "9000:9000"
healthcheck:
@ -45,22 +45,22 @@ services:
extra_hosts:
- "host.docker.internal:host-gateway"
v3-watcher-server:
sushiswap-v3-watcher-server:
restart: unless-stopped
depends_on:
v3-watcher-db:
sushiswap-v3-watcher-db:
condition: service_healthy
v3-watcher-job-runner:
sushiswap-v3-watcher-job-runner:
condition: service_healthy
image: cerc/watcher-v3:local
image: cerc/watcher-sushiswap-v3:local
environment:
CERC_SCRIPT_DEBUG: ${CERC_SCRIPT_DEBUG}
CERC_ETH_RPC_ENDPOINTS: ${CERC_ETH_RPC_ENDPOINTS}
command: ["bash", "./start-server.sh"]
volumes:
- ../config/watcher-v3/watcher-config-template.toml:/app/environments/watcher-config-template.toml
- ../config/watcher-v3/start-server.sh:/app/start-server.sh
- v3_watcher_gql_logs_data:/app/gql-logs
- ../config/watcher-sushiswap-v3/watcher-config-template.toml:/app/environments/watcher-config-template.toml
- ../config/watcher-sushiswap-v3/start-server.sh:/app/start-server.sh
- sushiswap-v3_watcher_gql_logs_data:/app/gql-logs
ports:
- "127.0.0.1:3008:3008"
- "9001:9001"
@ -74,5 +74,5 @@ services:
- "host.docker.internal:host-gateway"
volumes:
v3_watcher_db_data:
v3_watcher_gql_logs_data:
sushiswap-v3_watcher_db_data:
sushiswap-v3_watcher_gql_logs_data:

View File

@ -2,6 +2,7 @@
host = "0.0.0.0"
port = 3008
kind = "active"
gqlPath = "/"
# Checkpointing state.
checkpointing = true
@ -21,30 +22,23 @@
# Interval in number of blocks at which to clear entities cache.
clearEntitiesCacheInterval = 1000
# Max block range for which to return events in eventsInRange GQL query.
# Use -1 for skipping check on block range.
maxEventsBlockRange = 1000
# Flag to specify whether RPC endpoint supports block hash as block tag parameter
rpcSupportsBlockHashParam = false
# Server GQL config
[server.gql]
path = "/"
# GQL cache settings
[server.gqlCache]
enabled = true
# Max block range for which to return events in eventsInRange GQL query.
# Use -1 for skipping check on block range.
maxEventsBlockRange = 1000
# Max in-memory cache size (in bytes) (default 8 MB)
# maxCacheSize
# Log directory for GQL requests
logDir = "./gql-logs"
# GQL cache settings
[server.gql.cache]
enabled = true
# Max in-memory cache size (in bytes) (default 8 MB)
# maxCacheSize
# GQL cache-control max-age settings (in seconds)
maxAge = 15
timeTravelMaxAge = 86400 # 1 day
# GQL cache-control max-age settings (in seconds)
maxAge = 15
timeTravelMaxAge = 86400 # 1 day
[metrics]
host = "0.0.0.0"
@ -91,9 +85,6 @@
# Filecoin block time: https://docs.filecoin.io/basics/the-blockchain/blocks-and-tipsets#blocktime
blockDelayInMilliSecs = 30000
# Number of blocks by which block processing lags behind head
blockProcessingOffset = 0
# Boolean to switch between modes of processing events when starting the server.
# Setting to true will fetch filtered events and required blocks in a range of blocks and then process them.
# Setting to false will fetch blocks consecutively with its events and then process them (Behaviour is followed in realtime processing near head).

View File

@ -0,0 +1,8 @@
version: "1.0"
name: sushiswap-v3
description: "SushiSwap v3 watcher stack"
repos:
containers:
- cerc/watcher-sushiswap-v3
pods:
- watcher-sushiswap-v3