Automatic node-red docker provisionning from github

Hi
I'm looking to automate the provisionning of node-red docker instances based on a github repository.
If needed we would build our own docker image from the official one and adds necessary scripting.

The idea is to be able to launch a docker of node-red with an argument (ENV ?) pointing to a github repo from where it should pull:

  1. the flows (flow.json, flow_cred.json, package.json)
  2. settings.js

Regarding feasability:

  1. would be easily achieved by using the Project feature and adding a git clone in the script before starting node-red
  2. I would assume that the settings.js could be added manually to the same repo and could be pulled at the same time

What I'm not sure is about the dependencies that are in the package.json
Would they be installed automatically or should I do add anything prior to launching node-red to have them installed ?

Thanks

While experimenting with projects, I noticed a problem with dependencies.
I manually installed a node from a github repo using

npm install github:username/repositoryname#branchname

Then I added the node to the projects dependencies (fro the GUI Project => Settings)
However, it was not added in package.json with the github source but with a version number, like a node installed from the palette:

    "dependencies": {
        "mycustomnode": "0.0.1",
        "node-red-contrib-key-value-store": "0.1.8"
    },

As such, it cannot be install from the project dependencies windows

If I modify the package.json file as:

  "dependencies": {
        "mycustomnode": "github:username/mycustomnode#branchname",
        "node-red-contrib-key-value-store": "0.1.8"
    },

then it installs properly.
Is that a bug or is there a better way to install a custom node and be sure it is properly added to the dependencies ?

Thanks

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.