This is a small wrapper that should allow you to introduce version control via Git to the VanPi Node RED development workflow.
The approach taken here is loosely based on this tutorial.
- Docker
- A MacOS or Linux machine (for the bash scripts provided, which can otherwise easily be rewritten for Windows)
- Clone this repository on your local machine within a directory of your choice
- From the folder in which you cloned the repo, run:
~$ ./create-node-red-docker.sh
~$ ./start-node-red-docker.sh
- Create your own fork of the
VAN_PIrepository, which is where you will develop custom features and keep in sync with the original project - Open Node RED at http://127.0.0.1:1880/ and start a new project by clicking on "Clone Repository"
- Provide your username and email address and click "Next"
- Copy-paste the SSH address of your cloned VAN_PI repository into "Git Repository URL"
- Click on "Add an ssh key" and copy the obtained public key into your GitHub SSH keys
- You might need to refresh Node RED in your browser and start adding the repository again, following the steps above, after closing the SSH window
- Click on "Clone project" and wait (this might take a few minutes)
- You will get a "Project package file not found" error. Click on "Setup project files"
- Next to Files, click "edit" and point Package and Flow to
/VanPi-OS/package.jsonand/VanPi-OS/flows.json - Click "Save"
You should now be able to develop in Node RED and push / pull changes to your forked Git repository. I suggest watching this video for a demonstration of how the development workflow looks like.