Provides Node-RED with netFIELD V2 authentication, https and several useful common Node-RED nodes
Adapted from https://github.com/HilscherAutomation/netFIELD-nodered and https://github.com/node-red/node-red-docker/
Need to be run on netFIELD OS > V2.0.0.0
docker run -d --restart=always --pull=always --network=host -v nodereddata:/data --name mynodered noycebe/netfield-node-red:<tag>
{
"HostConfig": {
"Privileged": true,
"NetworkMode": "host",
"PortBindings": {
"1880/tcp": [
{
"HostPort": "1880"
}
]
},
"Mounts": [
{
"Type": "volume",
"Source": "nodered",
"Target": "/data",
"ReadOnly": false,
"Consistency": "consistent"
}
]
}
}
The container must be run in host mode, otherwise the authentication will fail. In the user-authentication_v2.js the IP is 127.0.0.1 (localhost) to check for authentication. In bridge mode, this IP address needs to be adapted.
node-red-contrib-opcua
node-red-contrib-influxdb
node-red-contrib-modbus
node-red-dashboard
node-red-node-serialport
adminAuth: require("/data/user-authentication_v2.js"),
https: {
key: require("fs").readFileSync('/data/certs/node-key.pem'),
cert: require("fs").readFileSync('/data/certs/node-cert.pem')
},
requireHttps: true,
if [ ! -e container_first_start ]; then
echo "Container is starting the first time"
mkdir -p /data/certs
openssl genrsa -out /data/certs/node-key.pem 4096
openssl req -new -sha256 -key /data/certs/node-key.pem -out /data/certs/node-csr.pem -subj "/C=DE/ST=Hessen/L=Hattersheim/O=Hilscher/OU=Hilscher/CN=$HOSTNAME/[email protected]"
openssl x509 -req -days 365 -in /data/certs/node-csr.pem -signkey /data/certs/node-key.pem -out /data/certs/node-cert.pem
touch container_first_start
fi' /usr/src/node-red/entrypoint.sh
Content type
Image
Digest
sha256:cb62e4fbb…
Size
422.6 MB
Last updated
about 2 months ago
docker pull noycebe/netfield-node-red:5.0.4