lorenwest / node-red-contrib-state

Node-RED shared logical state with persistence, notification, and history
MIT License
7 stars 6 forks source link

How to specify the path where to store the shared-state directory #20

Open m4rc0d1 opened 15 hours ago

m4rc0d1 commented 15 hours ago

I just migrated my node-red system to Docker and I found no way to specify the path for the shared-state directory. It seems that node-red-contrib-state uses the homedir of the user running node-red, but the Docker image defines /data for the volume that is persistent across rebuild and upgrades, while the home directory is recreated from scratch every time.

Is it possible to specify to store shared-state under /data or another arbitrary path?.

lorenwest commented 13 hours ago

Yep, sharedStateDir

https://github.com/lorenwest/node-red-contrib-state?tab=readme-ov-file#shared-state-storage