# Automatic node-red docker provisionning from github

**URL:** <https://discourse.nodered.org/t/automatic-node-red-docker-provisionning-from-github/62063>\
**Category:** General\
**Tags:** docker\
**Created:** [2 May 2022 13:29 UTC](https://discourse.nodered.org/t/automatic-node-red-docker-provisionning-from-github/62063 "2022-05-02T13:29:56Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Barbudor](https://avatars.discourse-cdn.com/v4/letter/b/4af34b/32.png) [@Barbudor](https://discourse.nodered.org/u/Barbudor)\
**Post date:** [2 May 2022 13:29 UTC](https://discourse.nodered.org/t/automatic-node-red-docker-provisionning-from-github/62063/1 "2022-05-02T13:29:56Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Barbudor](https://avatars.discourse-cdn.com/v4/letter/b/4af34b/32.png) [@Barbudor](https://discourse.nodered.org/u/Barbudor)\
**Post date:** [2 May 2022 21:34 UTC](https://discourse.nodered.org/t/automatic-node-red-docker-provisionning-from-github/62063/2 "2022-05-02T21:34:21Z")

</div>

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:

```auto
    "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:

```auto
  "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

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [1 July 2022 21:34 UTC](https://discourse.nodered.org/t/automatic-node-red-docker-provisionning-from-github/62063/3 "2022-07-01T21:34:43Z")

</div>

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