stack-orchestrator/app/data/stacks/sushiswap-subgraph
prathamesh0 ddaddd2a8c
Add a sushiswap-subgraph stack (#496)
* Add a sushiswap-graph stack

* Fix shared volume name in fixturenet-lotus

* Export Lotus miner node multiaddr after initialization

* Add deployment scripts for sushiswap contracts

* Skip contracts deployment if already exists

* Rename stack to sushiswap-subgraph

* Fix postgres and use Lotus fixturenet in graph-node stack

* Add sushiswap v3 subgraph stack

* Fixes to deploy sushiswap subgraph to graph-node

* Add graph-node container in sushiswap subgraph stack

---------

Co-authored-by: Nabarun <nabarun@deepstacksoft.com>
2023-08-14 14:17:21 +05:30
..
README.md Add a sushiswap-subgraph stack (#496) 2023-08-14 14:17:21 +05:30
stack.yml Add a sushiswap-subgraph stack (#496) 2023-08-14 14:17:21 +05:30

SushiSwap Graph

Setup

Clone required repositories:

laconic-so --stack sushiswap-subgraph setup-repositories

Build the container images:

laconic-so --stack sushiswap-subgraph build-containers

Deploy

Deploy the stack:

laconic-so --stack sushiswap-subgraph deploy --cluster sushigraph up

After all services have started, wait and check that the subgraph has been deployed to graph-node

laconic-so --stack sushiswap-subgraph deploy --cluster sushigraph logs -f sushiswap-subgraph-v3

# Expected end output
# ...
# sushigraph-sushiswap-subgraph-v3-1  | - Deploying to Graph node http://graph-node:8020/
# sushigraph-sushiswap-subgraph-v3-1  | Deployed to http://graph-node:8000/subgraphs/name/sushiswap/v3-lotus/graphql
# sushigraph-sushiswap-subgraph-v3-1  |
# sushigraph-sushiswap-subgraph-v3-1  | Subgraph endpoints:
# sushigraph-sushiswap-subgraph-v3-1  | Queries (HTTP):     http://graph-node:8000/subgraphs/name/sushiswap/v3-lotus
# sushigraph-sushiswap-subgraph-v3-1  |
# sushigraph-sushiswap-subgraph-v3-1  | Done

Clean up

Stop all the services running in background run:

laconic-so --stack sushiswap-subgraph deploy --cluster sushigraph down

Clear volumes created by this stack:

# List all relevant volumes
docker volume ls -q --filter "name=sushigraph"

# Remove all the listed volumes
docker volume rm $(docker volume ls -q --filter "name=sushigraph")

# WARNING: After removing volumes with Lotus params
# They will be downloaded again on restart

# To remove volumes that do not contain Lotus params
docker volume rm $(docker volume ls -q --filter "name=sushigraph" | grep -v "params$")