Coder Social home page Coder Social logo

justdmitry / nanonodemonitor Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nanotools/nanonodemonitor

0.0 3.0 0.0 3.44 MB

Nano Node Monitor is a server-side PHP-based monitor for a Nano node.

License: GNU General Public License v3.0

PHP 64.76% Shell 0.80% CSS 21.22% JavaScript 4.66% Dockerfile 0.54% Handlebars 8.02%

nanonodemonitor's Introduction

Nano Node Monitor

GitHub release StyleCI Docker Pulls

Nano Node Monitor is a server-side PHP-based monitor for Nano and Banano nodes. It connects to a running node via RPC and displays it's status on a simple webpage. Being server-side, it does not expose the RPC interface of the Nano node to the public.

Nano Light Nano Dark Banano Light Banano Dark
Light Dark Banano Banano Dark

Docker Installation

Pulling Docker image

sudo docker pull nanotools/nanonodemonitor

Running

Standalone

sudo docker run -d -p 80:80 -v ~:/opt --restart=unless-stopped nanotools/nanonodemonitor

This will create a directory called nanoNodeMonitor inside your home directory with the config.php inside it. Edit it according to your needs and you're good to go!

Docker Compose

  1. Create a directory called nano and go inside it: mkdir nano && cd nano

  2. Create a new file called docker-compose.yml with the following contents (but replace the TAG with a proper version):

version: '3'
services:
  monitor:
    image: "nanotools/nanonodemonitor:TAG"
    restart: "unless-stopped"
    ports:
     - "80:80"
    volumes:
     - "~:/opt"
  node:
    image: "nanocurrency/nano:TAG"
    restart: "unless-stopped"
    ports:
     - "7075:7075"
     - "127.0.0.1:7076:7076"
    volumes:
     - "~:/root"
  1. Nice! Now execute sudo docker-compose up -d to start everything.

  2. Inside your home directory you will find a new directory called nanoNodeMonitor, edit the config.php: cd ~/nanoNodeMonitor

  3. You will have to change the node IP to the name of the nodes Docker container e.g. nano_node_1. Edit the other things as well if you want to.

  4. Done!

Manual Installation

Prerequisites

  • Running Nano Node with RPC enabled (Tutorial)

  • Webserver with PHP 8.0

  • PHP-Curl Module

    sudo apt-get install php-curl

Installation

In your empty webserver directory, e.g. /var/www/html, execute:

git clone https://github.com/NanoTools/nanoNodeMonitor .

If you want it to run a subdirectory remove the . at the end.

In the modules folder, create your own config file by executing:

cp config.sample.php config.php

Usage

You will have to add your node's account to the config file config.php by modifying the following lines. Make sure to remove the // in front of $nanoNodeAccount:

// account of this node
$nanoNodeAccount = 'nano_1youraccountname24cq9799nerek153w43yjc9atoaeg3e91cc9zfr89ehj';

Official documentation for creating an account on the node via RPC can be found at the following URL:

https://docs.nano.org/running-a-node/voting-as-a-representative/#step-2-setup-representative-account

If you are running a standalone node you might need to modify the IP-address and the port for the RPC in the file config.php. It should match the corresponding entries in ~/Nano/config.json, e.g.

// ip address for RPC (default: [::1])
$nanoNodeRPCIP   = '127.0.0.1';

// ip address for RPC (default: 7076)
$nanoNodeRPCPort = '7076';

Creating a Theme

If you're interested in creating your own theme in addition to the official Light, Dark, and Banano themes, we've made it very simple for you to do so. Check out the Wiki for more info.

Support

Donations to the development of Nano Node Monitor are very welcome to:

nano_1ninja7rh37ehfp9utkor5ixmxyg8kme8fnzc4zty145ibch8kf5jwpnzr3r

Or sponsor the development on GitHub! Thanks!

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.