Code Monkey home page Code Monkey logo

cbf-system-dashboard's Introduction

CBF-System-Dashboard

This project entails how Node-RED Dashboard is ran under Docker which shows the systems status and any arrays running.

CBF Dashboard

This project uses a modified version of Node-RED nodered/node-red-docker container on DockerHub.

Building Image

Build the docker image with the following command, which will also install all dependencies...

    $ docker build -t cbf-dashboard/cbf-system-dashboard .

CBF Dashboard

Startup container

To run the newly build docker container, execute the following command...

    docker run -h "${HOSTNAME}" --name=cbf-sys-dash --restart=on-failure:10 -p 1880:1880 cbf-dashboard/cbf-system-dashboard

Let's dissect that command...

    docker run      - run this container... and build locally if necessary first.
    -h "${HOSTNAME}" - run container with system hostname
    -p 1880:1880    - connect local port 1880 to the exposed internal port 1880
    --name cbf-sys-dash - give this machine a friendly local name
    --restart on-failure:10 -  the container will be restarted only if it stops
                               with an exit code other than 0. (0 is for normal
                               shutdown.)
    cbf-dashboard/cbf-system-dashboard - the image to base it on

Running that command should give a terminal window with a running instance of Node-RED

Docker logs

You can then browse to http://{host-ip}:1880 to access the Node-RED editor(Requires authentication)

Dashboard auth

and http://{host-ip}:1880/ui to access the Node-Red CBF Dashboard with additional links to select from...

Dashboard menu

Container Shell

    $ docker exec -it <containerID> /bin/bash

Will give a command line inside the container - where you can then run the npm install command you wish - e.g.

    $ cd /data
    $ npm install node-red-node-smooth
    [email protected] node_modules/node-red-node-smooth
    $ exit
    $ docker stop <containerID>
    $ docker start <containerID>

Refreshing the browser page should now reveal the newly added node in the palette.

Running headless

The barest minimum we need to just run Node-RED is

$ docker run -d -h "${HOSTNAME}" --name=cbf-sys-dash --restart=on-failure:10 -p 1880:1880 cbf-dashboard/cbf-system-dashboard

This will create a local running instance of a machine - that will have some docker id number and be running on a random port... to find out run

Docker ps

You can now point a browser to the host machine on the tcp port reported back, so in the example above browse to http://{host ip}:1880

User Permission Errors

If you are seeing permission denied errors opening files or accessing host devices, try running the container as the root user.

docker run -it -p 1880:1880 --name mynodered --user=root nodered/node-red-docker

cbf-system-dashboard's People

Contributors

mmphego avatar

Watchers

 avatar  avatar  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.