Azure docker settings.js location

When pulling the latest docker image onto an Azure container instance, the settings file ends up in the user directory instead of the mounted file share at /data.

Any way to avoid this so settings.js is on the file share? Would prefer not to write my own dockerfile if possible.

Cheers

Logs:

16 Oct 15:32:11 - [info] Node-RED version: v2.0.6
16 Oct 15:32:11 - [info] Node.js  version: v14.17.6
16 Oct 15:32:11 - [info] Linux 5.4.81-microsoft-standard x64 LE
16 Oct 15:32:11 - [info] Loading palette nodes
16 Oct 15:32:22 - [info] Settings file  : /usr/src/node-red/node_modules/node-red/settings.js
16 Oct 15:32:22 - [info] Context store  : 'default' [module=memory]
16 Oct 15:32:22 - [info] User directory : /data
16 Oct 15:32:22 - [warn] Projects disabled : editorTheme.projects.enabled=false
16 Oct 15:32:22 - [info] Flows file     : /data/flows.json
16 Oct 15:32:22 - [info] Server now running at http://127.0.0.1:1880/

The default image will put (copy it from /usr/src/node-red/node_modules/node-red if there isn't already one present) the settings.js in the /data directory as this is the default userDir for the container.

The only way it should be using the settings.js from /usr/src/node-red/node_modules/node-red/ is if you have explicitly asked it to by adding the --settings command line argument to the container.

I don't use azure, but there should be a way to get a full list of arguments that have been passed to the container some where?

There was no --settings command given, just the default command:

> node-red-docker@2.0.6 start /usr/src/node-red
> node $NODE_OPTIONS node_modules/node-red/red.js $FLOWS "--userDir" "/data"

After adding a settings.js to /data manually it pulls from the right location. Very strange.

It's the volume writeable by uid 1000?

Should be - it saves flows.js and all the credentials as expected.

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