Load externalModules from node-red dir

I'm building a custom docker image (version 2.0.5) with some dependencies installed, to be used in different projects, I'm installing these dependencies in node-red working directory "/usr/src/node-red", I looked at the docker file to take an example.

When I load an external module the function node is loading from "/data/node_modules/....".

Today "/data" is with the files of each project, each project has its own volume where there is an automatic backup on the host of the virtual machine.

Is it possible to load external modules in the role node of the default node-red directory instead of the working directory "/data..."?

Before we loaded the modules by require, we are testing version 2.0 and we plan to make some refactories, one of them includes using the external modules in the new "correct" way.

My Dockerfile:

FROM nodered/node-red:2.0.5
RUN npm install mongodb

image

Tks!

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.