0
votes

Overview:

I updated the MySQL Node-RED module and now I must restart Node-RED to enable it. The message as follows:

Node-RED must be restarted to enable upgraded modules

Problem:

I am running the official node-red docker container using docker-compose and there is no command node-red command when I enter the container as suggested in-the-docs.

Question

How do I manually restart the node-red application without the shortcut in the official nodered docker container?

Caveats:

  • I have never used node.js and I am new to node-red.
  • I am fluid in Linux and other programming languages.

Steps-to-reproduce

  1. Install docker and docker-compose.
  2. Create a project directory with the docker-compose.yml file
  3. Start the service: docker-compose up
  4. navigate to the http://localhost:1880
  5. click the hamburger menu icon->[manage-pallet]->pallet and search for and update the MySQL package.
  6. Go into nodered container: docker-compose exec nodered bash
  7. execute: node-red
  8. result: bash: node-red: command not found

File:

docker-compose.yml

# 
version: "2.7"

services:
  nodered:
    image: nodered/node-red:latest
    user: root:root
    environment:
      - TZ=America/New_York
    ports:
      - 1880:1880
    networks:
      - nodered-net
    volumes:
      - ./nodered_data:/data
networks:
  nodered-net:

1

1 Answers

1
votes

You will need to bounce the whole container, there is no way to restart Node-RED while keeping the container running because the running instance is what keeps the container alive.

Run docker ps to find the correct container instance then run docker restart [container name]

Where [container name] is likely to be something like nodered-nodered_1