November-5th-2019, 02:59 PM
Hi there,
here is one possibility:
The Node-RED in the container has a working directory under /root/.node-red . In this folder the Node-RED will save the flow every time you do a deploy.
So what you could do is to keep the folder /root/.node-red saved to "somewhere" for those times where you do a restart/redeploy of the container.
Here is now to proceed: Use the "Volumes" function in the left menu of the Docker Web-UI. Then give your volume a name like "nodered" and click "create volume". This will then create a local volume/storage. Such a volume is mappable.
Then go to your "container create" dialog and use the possibility there to map specific folders of a container to a volume. Then as container source path use "/root/.node-red" and as volume your "nodered" volume ... then create your container as usual.
Whenever you now start/restart/redeploy you Node-RED container again with the same volume mapped, then this container will use the contents of the mapped volume as working directory.
Thx
Armin
here is one possibility:
The Node-RED in the container has a working directory under /root/.node-red . In this folder the Node-RED will save the flow every time you do a deploy.
So what you could do is to keep the folder /root/.node-red saved to "somewhere" for those times where you do a restart/redeploy of the container.
Here is now to proceed: Use the "Volumes" function in the left menu of the Docker Web-UI. Then give your volume a name like "nodered" and click "create volume". This will then create a local volume/storage. Such a volume is mappable.
Then go to your "container create" dialog and use the possibility there to map specific folders of a container to a volume. Then as container source path use "/root/.node-red" and as volume your "nodered" volume ... then create your container as usual.
Whenever you now start/restart/redeploy you Node-RED container again with the same volume mapped, then this container will use the contents of the mapped volume as working directory.
Thx
Armin
„You never fail until you stop trying.“, Albert Einstein (1879 - 1955)