Node-red container don't have 'setting.js' file

2/4/2019

I downloaded the official node-red container.

I noticed that the file 'setting.js' is missing inside it.

I tried to insert it manually inside the container but it is not read when node-red is started. I was wondering if there was a way to insert it or anyway an alternative way to set the credentials to access the admin page of node-red.

I pull nodered/node-red-docker:0.18.4-v8.

Usually setting.js file is inside .node-red/setting.js, but not in this case. This container have the path: /usr/src/node-red/ and when I enter with command docker exec -it container_name bash, i'm inside the directory node-red. I tried to put the setting.js in this path but not work

-- Martina Pesca Bellio
containers
docker
dockerhub
kubernetes
node-red

1 Answer

2/4/2019

You should not change the copy of settings.js in /usr/src/node-red this is the default and should be left alone. Also editing this file after starting the container will not work as it is copied to the userDir the first time Node-RED is started.

If you want to include your own version you should mount it into the /data directory as this is the userDir for the system when running.

You can use the docker -v option to mount a local copy of the file into the container.

docker -v /path/to/settings.js:/data/settings.js ...
-- hardillb
Source: StackOverflow