2020-04-21 16:37:11 +02:00
2020-04-21 16:36:33 +02:00
2020-04-06 16:54:07 +02:00
2020-04-21 16:37:11 +02:00
2020-04-06 15:38:45 +02:00
2020-04-21 16:36:33 +02:00
2018-06-18 18:39:56 +02:00

Polkadot Telemetry

Overview

This repository contains both the backend ingestion server for Substrate Telemetry as well as the Frontend you typically see running at telemetry.polkadot.io.

The backend is a Rust project and the frontend is React/Typescript project.

Getting Started

To run the backend, you will need cargo to build the binary. We recommend using rustup.

To run the frontend make sure to grab the latest stable version of node and install dependencies before doing anything:

nvm install stable
yarn

Terminal 1 - Backend

cd backend
cargo build --release
./target/release/telemetry --help

By default, telemetry will listen on the local interface only (127.0.0.1) on port 8000. You may change both those values with the --listen flag as shown below:

telemetry --listen 0.0.0.0:8888

This example listen on all interfaces and on port :8888

Terminal 2 - Frontend

cd frontend
yarn
yarn start

Terminal 3 - Node

Follow up installation instructions from the Polkadot repo

polkadot --dev --telemetry-url ws://localhost:8000/submit

Run via Docker

To run via docker make sure that you have Docker Desktop. If you don't you can download for you OS here Docker Desktop

docker-compose up --build -d
  • -d stands for detach, if you would like to see logs I recommend using Kitmatic or don't use the -d
  • --build will build the images and rebuild, but this is not required every time
  • If you want to makes UI changes, there is no need to rebuild the image as the files are being copied in via volumes.

Now navigate to localhost:3000 in your browser to view the app.

Docker

Build & Publish the Frontend docker image

The building process is standard. You just need to notice that the Dockerfile is in ./packages/frontend/ and tell docker about it. The context must remain the repository's root though.

DOCKER_USER=chevdor ./scripts/build-docker-frontend.sh 
S
Description
No description provided
Readme GPL-3.0 97 MiB
Languages
Rust 62.6%
TypeScript 31.7%
CSS 4.6%
JavaScript 0.6%
Dockerfile 0.3%
Other 0.1%