Run NR in Docker Container or Virtual Machine?

No. The palette manager can only be used to install npm modules that have been listed in the flow library.

Which ones in particular? You'd have to dig into them to find out. They may simply require you to have ffmpeg preinstalled.

I also consider NR on docker for a while and decide not to use it. My app is the IOT which using 1 NR for back-end and 2 node-red-dashboard front-end. They are having different setting.js. So using docker is difficult to setup (when port to new host). Docker is good if you have the same setup for multiple containers.

I'm using 3 NR instances running on the same VM. I'm control the NR instance using PM2. All 3 NR share the same static http folder and data file.
I'm just created a new node-red folder, copy only setting.js to those folders and use command:

node -s /home//node-red1/settings.js -u /home//node-red1
node -s /home//node-red2/settings.js -u /home//node-red2
node -s /home//node-red3/settings.js -u /home//node-red3

NR will copied itself to each folder. Each NR will run separately. That means you need to add paletted of each NR.
Of course, setting.js in each folder is using different port.

Welcome, @tbdltee

I’m afraid you lost me on much of that, but it sounds impressive :+1:

Are you talking about running the VM on your NAS ? Initially i would not do that - for the very reasons you have mentioned - simplify - run it on your PC first in a virtual machine and then later migrate to your NAS (which probably requires license keys for virtualisation)

Craig

All VMs and Containers are handled on my qnap , it’s pretty straight forward, and I’ve had no issues with performance or licensing...

You can check out the fun i’m having with installing a Debian vm for Node Red here - > NR Install Script - “Failed to install node.js” error

1 Like

I think you've already been decided to walk through to the docker path. So, there is no point to compare VM vs docker anymore.
Docker is using micro-service concept. I myself personally would like to use standard NR container package. Thus, I would consider to create ffmpeg as another container and communicated to the existing NR containers using TCP.
So you will have ffmeg micro-service, NR dashboard micro-services. and they are talking to each others.

I'm still progressing with the Debian VM running NR, as I'm intrigued how well that works, but your comment (extracted/trimmed below) is of interest.

How do you do that ?

What you describe is a lot of extra work for very little benefit. ffmpeg isn't a service you run. It is a command-line utility you can call to do stuff. To create a micro-service from it would take a bunch of code to run, listening for requests, running them and passing back the result.

That really is overkill when all you need to do is build one container with node-red and ffmpeg installed and use the exec node in node-red to call ffmpeg.

Ultimately it's up to @nodecentral on the approach he takes. He has to decide if creating a three line Dockerfile is more work than creating multiple Dockerfiles and services within them and joining them all together.

I agree. If his work is stoped at 3 containers, it would be OK to build ffmeg inside them. I just think of a big system which built everything with micro-service concept.
However, it's better to keep it simple.
Maybe it has another way like create an watched folder for ffmpeg on host and share this folder amoung all NR containers.