Skip to content
This repository has been archived by the owner on Sep 22, 2020. It is now read-only.

cabarnes/storjmon

Repository files navigation

Build Status Coverage Status Docker Status

StorjMon - Monitor for Storj Nodes

Preliminary version with only manual updates of node information from the Storj API.

Installing Dependencies

The application uses pipenv for dependencies. To initialize an environment, run the following:

pipenv install

To install development dependencies, run the following:

pipenv install --dev

Running

The application can be run using a command line interface, web interface, or in Docker. The application must be run from the virtual environment created by pipenv. Before running any local commands, launch the pipenv shell by running the following:

pipenv shell

Web Interface

The web interface uses Flask. To start the development server, run the following:

FLASK_APP=gui/monitor.py python -m flask run

Command Line Interface

The command line interface can be started by running the following to see the list of options:

python -m cli

Docker

The Docker image runs the web interface using uwsgi.

The latest Docker image can be downloaded and started by running the following:

docker run --name storjmon -p 80:80 cabarnes/storjmon

The Docker image can be built by running the following:

docker build -t storjmon .

The locally built image can be started by running the following:

docker run --name storjmon -p 80:80 storjmon

Testing

Testing is done using pytest and prospector. To execute the tests, run the following:

pytest && prospector

NOTE: The development dependencies must be installed.