node-red / node-red-docker

Repository for all things Node-RED and Docker related
Apache License 2.0
481 stars 383 forks source link

Cannot load external flows for env var FLOWS=http... #391

Closed d0uub closed 1 year ago

d0uub commented 1 year ago

when run docker with env var FLOWS=https://...

it shows the log in docker :

19 Sep 07:21:33 - [info] Node-RED version: v3.1.0 19 Sep 07:21:33 - [info] Node.js version: v16.20.2 19 Sep 07:21:33 - [info] Linux 4.18.0-305.62.1.el8_4.x86_64 x64 LE 19 Sep 07:21:37 - [info] Loading palette nodes 19 Sep 07:21:43 - [info] Settings file : /data/settings.js 19 Sep 07:21:43 - [info] Context store : 'default' [module=memory] 19 Sep 07:21:43 - [info] User directory : /data 19 Sep 07:21:43 - [warn] Projects disabled : editorTheme.projects.enabled=false 19 Sep 07:21:43 - [info] Flows file : /data/https:/...

i am wondering "Flows file : /data/https:/" able to remove /data/ without custom docker image but not sure the consequence of remove --userDir setting

hardillb commented 1 year ago

You can not load flows via HTTP, the FLOWS env var must be a path to a file.

If you want to load flows from a HTTP endpoint you will need to write a custom Node-RED storage plugin and create an extended docker container to include the plugin (and modified settings.js to load/configure the plugin)