Skip to content
/ squid Public

Litentry's Squid is a multi chain data indexer for Substrate based networks

License

Notifications You must be signed in to change notification settings

litentry/squid

Repository files navigation

Litentry Squid

Sample squid project to demonstrate its structure and conventions. It accumulates kusama account balances and serves them via graphql API.

Prerequisites

  • node 16.x
  • docker

Quickly running the sample

Open 2 terminal windows. In the first run:

yarn
yarn db:init
yarn dev:polkadot

In the second run:

yarn query-node

If you want to index more networks locally just open a new terminal for each one and run:

yarn dev:{network}

Note: in local development .env is used to expose the database & query node ports.

Development Guide

TODO: link to gitbook

Deployments

Prerequisites

  • docker
  • docker-compose
  • make

Initial deployment

  • Checkout the project on the server
  • Run ./init-letsencrypt.sh to fetch an SSL certificate
  • Run docker-compose -f docker-compose.nginx.yml up -d to spin up nginx and certbot
  • Run yarn devkit deploy <module_name>

Subsequent deployments

  • Run yarn devkit deploy <module_name>

Make deploy should be a 'no-downtime' deployment. It will spin up new instances of the app and database and once its finished indexing it will switch nginx over to the new containers and tear down the old ones.

Useful commands

  • docker ps - list all running containers
  • docker logs *container name* - output container logs
  • docker exec -it *container name* psql -U postgres - log into postgres

About

Litentry's Squid is a multi chain data indexer for Substrate based networks

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages