stack-orchestrator/stack_orchestrator/data/stacks/sushiswap-v3/README.md
Nabarun 78092f5793
Some checks failed
Lint Checks / Run linter (push) Successful in 53s
Publish / Build and publish (push) Successful in 1m30s
Webapp Test / Run webapp test suite (push) Successful in 4m38s
Smoke Test / Run basic test suite (push) Successful in 4m49s
Deploy Test / Run deploy test suite (push) Successful in 5m55s
Fixturenet-Laconicd-Test / Run Laconicd fixturenet and Laconic CLI tests (push) Successful in 13m54s
K8s Deploy Test / Run deploy test suite on kind/k8s (push) Successful in 8m49s
Fixturenet-Eth-Plugeth-Arm-Test / Run an Ethereum plugeth fixturenet test (push) Failing after 3h13m0s
Fixturenet-Eth-Plugeth-Test / Run an Ethereum plugeth fixturenet test (push) Failing after 3h13m0s
Database Test / Run database hosting test on kind/k8s (push) Successful in 10m43s
Container Registry Test / Run contaier registry hosting test on kind/k8s (push) Successful in 4m40s
External Stack Test / Run external stack test suite (push) Successful in 5m16s
Update subgraph watcher stacks to configure multiple RPC endpoints (#822)
Part of [Ability to configure watchers with multiple RPC endpoints](https://www.notion.so/Ability-to-configure-watchers-with-multiple-RPC-endpoints-dc8d3ff4d647404ab718dfd5a4c9035c)

Reviewed-on: #822
Co-authored-by: Nabarun <nabarun@deepstacksoft.com>
Co-committed-by: Nabarun <nabarun@deepstacksoft.com>
2024-05-10 04:58:30 +00:00

115 lines
2.1 KiB
Markdown

# SushiSwap v3 Watcher
## Setup
Clone required repositories:
```bash
laconic-so --stack sushiswap-v3 setup-repositories --git-ssh --pull
```
Build the container images:
```bash
laconic-so --stack sushiswap-v3 build-containers
```
## Deploy
Create a spec file for the deployment:
```bash
laconic-so --stack sushiswap-v3 deploy init --output sushiswap-v3-spec.yml
```
### Ports
Edit `network` in the spec file to map container ports to host ports as required:
```
...
network:
ports:
sushiswap-v3-watcher-db:
- '5432'
sushiswap-v3-watcher-job-runner:
- 9000:9000
sushiswap-v3-watcher-server:
- 127.0.0.1:3008:3008
- 9001:9001
```
### Create a deployment
Create a deployment from the spec file:
```bash
laconic-so --stack sushiswap-v3 deploy create --spec-file sushiswap-v3-spec.yml --deployment-dir sushiswap-v3-deployment
```
### Configuration
Inside deployment directory, open the `config.env` file and set following env variables:
```bash
# External Filecoin (ETH RPC) endpoint to point the watcher to
CERC_ETH_RPC_ENDPOINTS=https://example-lotus-endpoint-1/rpc/v1,https://example-lotus-endpoint-2/rpc/v1
```
### Start the deployment
```bash
laconic-so deployment --dir sushiswap-v3-deployment start
```
* To list down and monitor the running containers:
```bash
# With status
docker ps -a
# Check logs for a container
docker logs -f <CONTAINER_ID>
```
* Open the GQL playground at http://localhost:3008/graphql
```graphql
# Example query
{
_meta {
block {
number
timestamp
}
hasIndexingErrors
}
factories {
id
poolCount
}
}
```
## Clean up
Stop all the sushiswap-v3 services running in background:
```bash
# Only stop the docker containers
laconic-so deployment --dir sushiswap-v3-deployment stop
# Run 'start' to restart the deployment
```
To stop all the sushiswap-v3 services and also delete data:
```bash
# Stop the docker containers
laconic-so deployment --dir sushiswap-v3-deployment stop --delete-volumes
# Remove deployment directory (deployment will have to be recreated for a re-run)
rm -r sushiswap-v3-deployment
```