Skip to content

Commit aa524d7

Browse files
author
Dave Conway-Jones
committed
Add env var for safe and projects, update README, bump to 1.0.1
to close #133 to close #141
1 parent 4439444 commit aa524d7

8 files changed

Lines changed: 177 additions & 235 deletions

File tree

.docker/Dockerfile.alpine

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ FROM base AS build
3939

4040
# Install Build tools
4141
RUN apk add --no-cache --virtual buildtools build-base linux-headers udev python && \
42-
npm install --unsafe-perm --no-update-notifier --only=production && \
42+
npm install --unsafe-perm --no-update-notifier --no-audit --only=production && \
4343
/tmp/remove_native_gpio.sh && \
4444
cp -R node_modules prod_node_modules
4545

@@ -77,9 +77,12 @@ RUN chown -R node-red:node-red /usr/src/node-red && \
7777
USER node-red
7878

7979
# Env variables
80-
ENV NODE_RED_VERSION=$NODE_RED_VERSION
81-
ENV FLOWS=flows.json
82-
ENV NODE_PATH=/usr/src/node-red/node_modules:/data/node_modules
80+
ENV NODE_RED_VERSION=$NODE_RED_VERSION \
81+
NODE_PATH=/usr/src/node-red/node_modules:/data/node_modules \
82+
FLOWS=flows.json
83+
84+
# ENV NODE_RED_ENABLE_SAFE_MODE=true # Uncomment to enable safe start mode (flows not running)
85+
# ENV NODE_RED_ENABLE_PROJECTS=true # Uncomment to enable projects option
8386

8487
# User configuration directory volume
8588
VOLUME ["/data"]

.github/no-response.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Configuration for probot-no-response - https://github.com/probot/no-response
2+
3+
# Number of days of inactivity before an Issue is closed for lack of response
4+
daysUntilClose: 14
5+
# Label requiring a response
6+
responseRequiredLabel: needs-more-info
7+
# Comment to post when closing an Issue for lack of response. Set to `false` to disable
8+
closeComment: >
9+
This issue has been automatically closed because there has been no response
10+
to our request for more information from the original author. With only the
11+
information that is currently in the issue, we don't have enough information
12+
to take action. Please reach out if you have or find the answers we need so
13+
that we can investigate further.

CONTRIBUTING.md

Lines changed: 8 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,10 @@ We welcome contributions, but request you follow these guidelines.
55
- [Raising issues](#raising-issues)
66
- [Feature requests](#feature-requests)
77
- [Pull-Requests](#pull-requests)
8-
- [Contributor License Agreement](#contributor-license-agreement)
98

109
This project adheres to the [Contributor Covenant 1.4](http://contributor-covenant.org/version/1/4/).
1110
By participating, you are expected to uphold this code. Please report unacceptable
12-
behavior to any of the [project's core team](https://github.com/orgs/node-red/teams/core).
11+
behavior to the project's core team at team@nodered.org.
1312

1413
## Raising issues
1514

@@ -30,29 +29,21 @@ At a minimum, please include:
3029

3130
## Feature requests
3231

33-
For feature requests, please raise them on the [mailing list](https://groups.google.com/forum/#!forum/node-red).
32+
For feature requests, please raise them on the [mailing list](https://discourse.nodered.org).
3433

3534
## Pull-Requests
3635

3736
If you want to raise a pull-request with a new feature, or a refactoring
3837
of existing code, it may well get rejected if you haven't discussed it on
39-
the [mailing list](https://groups.google.com/forum/#!forum/node-red) first.
38+
the [forum](https://discourse.nodered.org) first.
4039

41-
### Contributor License Agreement
40+
All contributors need to sign the JS Foundation's Contributor License Agreement.
41+
It is an online process and quick to do. You can read the details of the agreement
42+
here: https://cla.js.foundation/node-red/node-red.
4243

43-
In order for us to accept pull-requests, the contributor must first complete
44-
a Contributor License Agreement (CLA). This clarifies the intellectual
45-
property license granted with any contribution. It is for your protection as a
46-
Contributor as well as the protection of IBM and its customers; it does not
47-
change your rights to use your own Contributions for any other purpose.
44+
If you raise a pull-request without having signed the CLA, you will be prompted
45+
to do so automatically.
4846

49-
You can download the CLAs here:
50-
51-
- [individual](http://nodered.org/cla/node-red-cla-individual.pdf)
52-
- [corporate](http://nodered.org/cla/node-red-cla-corporate.pdf)
53-
54-
If you are an IBMer, please contact us directly as the contribution process is
55-
slightly different.
5647

5748
### Coding standards
5849

@@ -63,4 +54,3 @@ code base. Some basic rules include:
6354
- indent with 4-spaces, no tabs. No arguments.
6455
- opening brace on same line as `if`/`for`/`function` and so on, closing brace
6556
on its own line.
66-
- There are .jshintrc and .jscsrc files included in the project which may help

README.md

Lines changed: 128 additions & 194 deletions
Large diffs are not rendered by default.

docker-custom/Dockerfile.custom

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,12 @@ RUN chown -R node-red:node-red /usr/src/node-red && \
7171
USER node-red
7272

7373
# Env variables
74-
ENV NODE_RED_VERSION=$NODE_RED_VERSION
75-
ENV FLOWS=flows.json
76-
ENV NODE_PATH=/usr/src/node-red/node_modules:/data/node_modules
74+
ENV NODE_RED_VERSION=$NODE_RED_VERSION \
75+
NODE_PATH=/usr/src/node-red/node_modules:/data/node_modules \
76+
FLOWS=flows.json
77+
78+
# ENV NODE_RED_ENABLE_SAFE_MODE=true # Uncomment to enable safe start mode (flows not running)
79+
# ENV NODE_RED_ENABLE_PROJECTS=true # Uncomment to enable projects option
7780

7881
# User configuration directory volume
7982
VOLUME ["/data"]

docker-custom/README.md

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ cd node-red-docker/docker-custom
2020

2121
- Change the node-red version in package.json (from the docker-custom directory) to the version you require
2222
- Add optionally packages you require
23-
23+
2424
## 2. **docker-make.sh**
2525

26-
The `docker-make.sh` is a helper script to build a custom Node-RED docker image.
26+
The `docker-make.sh` is a helper script to build a custom Node-RED docker image.
2727

2828
Change the build arguments as needed:
2929

@@ -32,33 +32,32 @@ Change the build arguments as needed:
3232
- `--build-arg NODE_RED_VERSION=${NODE_RED_VERSION}` : don't change this, ${NODE_RED_VERSION} gets populated from package.json
3333
- `--build-arg OS=alpine` : the linux distro to use (alpine)
3434
- `--build-arg BUILD_DATE="$(date +"%Y-%m-%dT%H:%M:%SZ")"` : don't change this
35-
- `--build-arg TAG_SUFFIX=default` : to build the default or minimal image
35+
- `--build-arg TAG_SUFFIX=default` : to build the default or minimal image
3636
- `--file Dockerfile.custom` : Dockerfile to use to build your image.
3737
- `--tag testing:node-red-build` : set the image name and tag
38-
38+
3939
## 3. **Run docker-make.sh**
4040

41-
Run `docker-make.sh`
41+
Run `docker-make.sh`
4242

4343
```shell script
4444
$ ./docker-make.sh
4545
```
4646

4747
This starts building your custom image and might take a while depending on the system you are running on.
48-
48+
4949
When building is done you can run the custom image by the following command:
50-
50+
5151
```shell script
5252
$ docker run -it -p1880:1880 testing:node-red-build
5353
```
54-
54+
5555
With the following command you can verify your docker image:
56-
56+
5757
```shell script
5858
$ docker inspect testing:node-red-build
5959
```
6060

6161
## 4. **Advanced Configuration**
6262

6363
`Dockerfile.custom` can be modified as required. To add more applications the `scripts/install_devtools.sh` can be modified as needed.
64-

docker-custom/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "node-red-docker",
3-
"version": "1.0.0",
3+
"version": "1.0.1",
44
"description": "Low-code programming for event-driven applications",
55
"homepage": "http://nodered.org",
66
"license": "Apache-2.0",
@@ -10,7 +10,7 @@
1010
},
1111
"main": "node_modules/node-red/red/red.js",
1212
"scripts": {
13-
"start": "node $NODE_OPTIONS node_modules/node-red/red.js -v $FLOWS"
13+
"start": "node $NODE_OPTIONS node_modules/node-red/red.js $FLOWS"
1414
},
1515
"contributors": [
1616
{
@@ -27,7 +27,7 @@
2727
}
2828
],
2929
"dependencies": {
30-
"node-red": "1.0.0"
30+
"node-red": "^1.0.1"
3131
},
3232
"engines": {
3333
"node": ">=10"

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "node-red-docker",
3-
"version": "1.0.0",
3+
"version": "1.0.1",
44
"description": "Low-code programming for event-driven applications",
55
"homepage": "http://nodered.org",
66
"license": "Apache-2.0",
@@ -10,7 +10,7 @@
1010
},
1111
"main": "node_modules/node-red/red/red.js",
1212
"scripts": {
13-
"start": "node $NODE_OPTIONS node_modules/node-red/red.js -v $FLOWS"
13+
"start": "node $NODE_OPTIONS node_modules/node-red/red.js $FLOWS"
1414
},
1515
"contributors": [
1616
{
@@ -27,7 +27,7 @@
2727
}
2828
],
2929
"dependencies": {
30-
"node-red": "1.0.0"
30+
"node-red": "^1.0.1"
3131
},
3232
"engines": {
3333
"node": ">=10"

0 commit comments

Comments
 (0)