Git Product home page Git Product logo

ol-intelligence-server's Introduction

ol-intelligence-server

Providing answers with on-chain and off-chain data.

Prerequisites

Before running the ol-intelligence-server, make sure:

Running the ol-intelligence-server (Linux)

  1. Clone the repository
git clone https://github.com/0L-Analytics/ol-intelligence-server.git
  1. Navigate to the path that contains the docker-compose.yml file
cd /path/to/yml/directory
  1. For Ubuntu/Debian execute run.dev.sh. Service names as they defined in docker-compose.yml can be specified after the database backup filename, but this is optional.
sh run.dev.sh dump_all_121222.gz crawler client api
  1. Test the api at localhost:5004/ping
  2. Test the app at localhost:3007
  3. Test the tools at localhost:5005/ping

Useful docker commands

First build and then run all services defined in docker-compose.yml in background

docker compose up -d --build

Enter the db container to make queries directly on db:

docker exec -it ol-intel-db /bin/bash
/ # su postgres
/ $ psql "<entire content of DATABASE_URL variable in .env file>"
viz_dev=# select count(*) from paymentevent;
...
viz_dev=# select tx->'script'->>'function_name' from accounttransaction where address <> 'C906F67F626683B77145D1F20C1A753B';
...
viz_dev=# exit
/ $ exit
/ # exit

Get logs from a container

docker logs ol-intel-crawler

Get running containers

docker ps -a

Shut down comtainers and remove volumes (e.g. remove db)

docker compose down -v

Force remove a comtainers

docker rm -f ol-intel-crawler

TODOS

Apply a design like https://vikdiesel.github.io/admin-one-bulma-dashboard/ See issues on github Define branch naming conventions Optimize tools container (or merge with crawler or api)

Branch naming conventions

Two branches are pretty standard and self explanatory, dev and main. Development is never done directly on these two branches. Work branches are merged to dev branch. Testing is done on dev branch and only from dev branch it is allowed to push to main branch.

ol-intelligence-server's People

Contributors

paulito123 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.