Sample squid project to demonstrate its structure and conventions. It accumulates kusama account balances and serves them via graphql API.
- node 16.x
- docker
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.
TODO: link to gitbook
- docker
- docker-compose
- make
- 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>
- 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.
docker ps
- list all running containersdocker logs *container name*
- output container logsdocker exec -it *container name* psql -U postgres
- log into postgres