Skip to content

nonast/ol-intelligence-server

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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. Run the following docker compose command:
docker compose up -d --build

If you have an older version of docker compose installed, you might need to add a hyphen between docker and compose like:

docker-compose up -d --build
  1. Create the user table and populate it with data:
docker compose exec api python manage.py recreate_db
docker compose exec api python manage.py seed_db
  1. Test the api at localhost:5004/ping
  2. Test the app at localhost:3007

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 compose exec -it db /bin/sh
/ # su postgres
/ $ plsql "<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 compose logs ol-intel-crawler

Get running containers

docker ps

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

docker compose down -v

TODOS

See issues

Branch naming conventions

Two branches are pretty standard and self explanatory, dev and main. Nobody develops directly on these two branches. dev branch is used to merge all work branches. Testing is done on dev branch and only from dev branch it is allowed to push to main branch.

Working branches are not pushed to Github, unless there is a very good reason for it. One good reason could be two competing technologies that might take each other over at one time in the future.

About

Providing answers with data and visualizations.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 58.0%
  • JavaScript 37.7%
  • Dockerfile 1.8%
  • HTML 1.7%
  • Other 0.8%