RedMatic icon indicating copy to clipboard operation
RedMatic copied to clipboard

Frage: env Variablen - wo

Open hklages opened this issue 3 years ago • 1 comments

Ich brauche fĂĽr einige npm packages die env Variable DEBUG.

Im Moment habe ich die Datei /usr/local/addons/redmatic/bin/redmatic editiert und export DEBUG=sonos:* hinzugefĂĽg

Nach dem booten, war dann die DEBUG variable in Node-RED verfĂĽgbar.

Ist das der "richtige" Weg? Ich vermute, nach dem nächsten Update muss ich das wieder machen oder?

Vorher hatte ich .profile geändert - allerdings ohne Wirkung auf Node-RED

hklages avatar Dec 11 '20 15:12 hklages

ich brauche fĂĽr einige npm packages die env Variable

Die richtige stelle dazu fĂĽr Redmatic oder CCU3 wĂĽrde mich auch interessieren. habe auch ein node-red node, was mittels env-Variable (Beta-)Features freischaltet.

Oder wäre es auch ein Weg, dass in der settings.js einzutragen?

/usr/local/addons/redmatic/lib/node_modules/node-red/settings.js:

process.env.{{MY_ENV_VAR}} = {{MY_ENV_VAR_VALUE}};

Hab das noch nicht ausprobiert, sondern nur geraten!

djiwondee avatar Aug 20 '21 09:08 djiwondee