Git Product home page Git Product logo

decred-dashboard's Introduction

Altcoin Dashboard

Requirements

  • Node.js >= 4.2.6
  • Postgresql >= 9.3.10
  • (optional) Nginx for production env (static files delivery)

Installation and configuration

Clone this repository:

git clone https://github.com/jholdstock/decred-dashboard.git

Install all dependencies:

npm install

Rename file 'config/config.json.sample' to 'config/config.json' and fill it with your correct Postgres database credentials.

Now you need Sequelize-CLI and PM2 installed globally:

sudo npm install -g pm2
sudo npm install -g sequelize-cli

Migrate database (if you will not specify NODE_ENV, sequelize will use configs for "development"):

NODE_ENV=production sequelize db:migrate

Well, now you can run application with PM2:

pm2 start package.json

If everything ok, cronjobs will start all parsers in the next 1-5 minutes, which will fill your database with real data. If you don't see still anything interesting on localhost:8080, you can track application logs with "pm2 logs 0" command.

Preparing ubuntu to run alt-stats

sudo apt-get update

# project
sudo apt-get install -y git
cd /var/www
git clone https://github.com/jholdstock/decred-dashboard.git
cd decred-dashboard

#node
sudo apt-get install -y nodejs npm
ln -s -f /usr/bin/nodejs /usr/bin/node
npm install
sudo npm install -g pm2 sequelize-cli

#postgres
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ `lsb_release -cs`-pgdg main" >> /etc/apt/sources.list.d/pgdg.list'
wget -q https://www.postgresql.org/media/keys/ACCC4CF8.asc -O - | sudo apt-key add -
sudo apt-get update
sudo apt-get install -y postgresql postgresql-contrib
sudo su - postgres
	createuser --pwprompt alt-stats
	createdb -O alt-stats stats-db

#config
cp config/config.json.sample config/config.json
vi config/config.json

#build db
sequelize db:migrate

#nginx (production only)
sudo apt-get install -y nginx

#firewall (production only)
sudo apt-get install -y ufw
sudo ufw allow 22/tcp
sudo ufw allow 80/tcp
sudo ufw allow 443/tcp
sudo ufw enable

#startup (production only)
pm2 startup ubuntu

decred-dashboard's People

Contributors

dyrk avatar jholdstock avatar dwrx avatar gitter-badger avatar

Watchers

 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.