Socket
Book a DemoInstallSign in
Socket

@subql/indexer-coordinator

Package Overview
Dependencies
Maintainers
2
Versions
126
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@subql/indexer-coordinator

## Start with Docker

latest
npmnpm
Version
0.3.11
Version published
Weekly downloads
303
10000%
Maintainers
2
Weekly downloads
 
Created
Source

INDEXER COORDINATOR

Start with Docker

Start all the services: db service coordinator service and proxy service together with docker compose command.

Run Docker Compose

docker-compose up
1

Indexer Management with Admin App

For the default configuration, open the indexer admin app with http://localhost:8000

2

Start With CLI

Install

npm install -g @subql/indexer-coordinator@0.1.1-10

Start Coordinator Service

Start a Postgres DB

Need to start a postgres DB server before run the coordinator service. The following is an example to start a service with docker:

# Install and start the db server
docker run --name "coordinator-server" -e POSTGRES_PASSWORD="postgres" \
    -e PGPASSWORD="postgres" \
    -p 5432:5432 \
    -d postgres

# Create db
docker exec -i "coordinator-server" psql -U postgres -c "create database \"coordinator\""

Run the Coordinator Command

  • Show all the parameters
# Run the `help` command line
subql-coordinator -help

# All the parameters
Indexer Coordinator
  --network      Network type for the service
            [string] [choices: "local", "testnet", "mainnet"] [default: "local"]
  --ws-endpoint  Specify wss endpoint for this network       [string] [required]
  --port         Port the service will listen on        [number] [default: 8000]

Postgres
  --postgres-host      Postgres host                         [string] [required]
  --postgres-port      Postgres port                    [number] [default: 5432]
  --postgres-username  Postgres username          [string] [default: "postgres"]
  --postgres-password  Postgres password          [string] [default: "postgres"]
  --postgres-database  Postgres database name                [string] [required]

Options:
  --version  Show version number                                       [boolean]
  ---help

  • Start coordinator service
subql-coordinator --network testnet \
    --ws-endpoint 'https://moonbeam-alpha.api.onfinality.io/public' \
    --postgres-host localhost \
    --postgres-database coordinator \
    --postgres-port 5432 \
    --port 8000
  • Open Indexer Admin Dapp

Open the indexer-admin app with http://localhost:8000. The domain and port depends on the deployment.

Development

Run the following command to build the local image for the coordinator updates

yarn build:docker-compose

Then start all the services:

yarn start:docker-compose

FAQs

Package last updated on 18 Jul 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts