Code Monkey home page Code Monkey logo

node-red-docker's Introduction

Node-RED-Docker

Template project for running Node-RED in Docker

The code in this repository is to provide a starting project for Node-RED, where the aim is to run in a production, cloud based environment. There have been a few modifications over the standard Node-RED released code.

How to use this project

  1. using a standard install of Node-RED with the projects feature enabled, clone a fork of this repository
  2. develop your Node-RED application
  3. when you are ready to release it use the Dockerfile in this repository to build your application

See the tutorials here

Changes from a standard Node-RED install

Node-RED Editor

In a production system the Node-RED editor should be disabled. However, in this project the editor has been moved from the root (/) endpoint to the /admin endpoint to allow the application to be examined within the container.

It is recommended that the editor be disabled for any production workload. This is achieved by modifying the settings.js file to change the httpAdminRoot property from "/admin" to false : **httpAdminRoot: false,**

For more details about configuring the runtime using the settings.js file see the configuration section of the Node-RED documentation.

Health endpoints

When running containers within a managed cloud environment, it is often useful to provide some endpoints within the container, so the cloud management system can verify the container is still alive and responding to requests.

This project adds the Health Checking capability from CloudNativeJS.io. The integration has be done in the server.js file by adding the following lines of code:

var health = require('@cloudnative/health-connect');

var healthcheck = new health.HealthChecker();
app.use('/live', health.LivenessEndpoint(healthcheck));
app.use('/ready', health.ReadinessEndpoint(healthcheck));
app.use('/health', health.HealthEndpoint(healthcheck));

node-red-docker's People

Contributors

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