Added node-red and pgadmin to the apps role
This commit is contained in:
@@ -0,0 +1 @@
|
||||
podman build --tag node-red:{{nodered_version}} .
|
||||
@@ -0,0 +1,19 @@
|
||||
[
|
||||
{
|
||||
"id": "f6f2187d.f17ca8",
|
||||
"type": "tab",
|
||||
"label": "Flow 1",
|
||||
"disabled": false,
|
||||
"info": ""
|
||||
},
|
||||
{
|
||||
"id": "3cc11d24.ff01a2",
|
||||
"type": "comment",
|
||||
"z": "f6f2187d.f17ca8",
|
||||
"name": "WARNING: please check you have started this container with a volume that is mounted to /data\\n otherwise any flow changes are lost when you redeploy or upgrade the container\\n (e.g. upgrade to a more recent node-red docker image).\\n If you are using named volumes you can ignore this warning.\\n Double click or see info side panel to learn how to start Node-RED in Docker to save your work",
|
||||
"info": "\nTo start docker with a bind mount volume (-v option), for example:\n\n```\ndocker run -it -p 1880:1880 -v /home/user/node_red_data:/data --name mynodered nodered/node-red\n```\n\nwhere `/home/user/node_red_data` is a directory on your host machine where you want to store your flows.\n\nIf you do not do this then you can experiment and redploy flows, but if you restart or upgrade the container the flows will be disconnected and lost. \n\nThey will still exist in a hidden data volume, which can be recovered using standard docker techniques, but that is much more complex than just starting with a named volume as described above.",
|
||||
"x": 350,
|
||||
"y": 80,
|
||||
"wires": []
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,34 @@
|
||||
var http = require('http');
|
||||
var https = require('https');
|
||||
var settings = require('/data/settings.js');
|
||||
var request;
|
||||
|
||||
process.env["NODE_TLS_REJECT_UNAUTHORIZED"] = 0;
|
||||
|
||||
var options = {
|
||||
host : "127.0.0.1",
|
||||
port : settings.uiPort || 1880,
|
||||
timeout : 4000
|
||||
};
|
||||
|
||||
if (settings.hasOwnProperty("https")) {
|
||||
request = https.request(options, (res) => {
|
||||
//console.log(`STATUS: ${res.statusCode}`);
|
||||
if ((res.statusCode >= 200) && (res.statusCode < 500)) { process.exit(0); }
|
||||
else { process.exit(1); }
|
||||
});
|
||||
}
|
||||
else {
|
||||
request = http.request(options, (res) => {
|
||||
//console.log(`STATUS: ${res.statusCode}`);
|
||||
if ((res.statusCode >= 200) && (res.statusCode < 500)) { process.exit(0); }
|
||||
else { process.exit(1); }
|
||||
});
|
||||
}
|
||||
|
||||
request.on('error', function(err) {
|
||||
//console.log('ERROR',err);
|
||||
process.exit(1);
|
||||
});
|
||||
|
||||
request.end();
|
||||
@@ -0,0 +1,37 @@
|
||||
{
|
||||
"name": "node-red-docker",
|
||||
"version": "4.0.9",
|
||||
"description": "Low-code programming for event-driven applications",
|
||||
"homepage": "http://nodered.org",
|
||||
"license": "Apache-2.0",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/node-red/node-red-docker.git"
|
||||
},
|
||||
"main": "node_modules/node-red/red/red.js",
|
||||
"scripts": {
|
||||
"start": "node $NODE_OPTIONS node_modules/node-red/red.js $FLOWS",
|
||||
"debug": "node --inspect=0.0.0.0:9229 $NODE_OPTIONS node_modules/node-red/red.js $FLOWS",
|
||||
"debug_brk": "node --inspect=0.0.0.0:9229 --inspect-brk $NODE_OPTIONS node_modules/node-red/red.js $FLOWS"
|
||||
},
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Dave Conway-Jones"
|
||||
},
|
||||
{
|
||||
"name": "Nick O'Leary"
|
||||
},
|
||||
{
|
||||
"name": "James Thomas"
|
||||
},
|
||||
{
|
||||
"name": "Raymond Mouthaan"
|
||||
}
|
||||
],
|
||||
"dependencies": {
|
||||
"node-red": "4.0.9"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18"
|
||||
}
|
||||
}
|
||||
Executable
+1
@@ -0,0 +1 @@
|
||||
podman run --rm -v nodered:/data:Z -p 1880:1880 --name node-red node-red:latest
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
#!/bin/bash
|
||||
|
||||
trap stop SIGINT SIGTERM
|
||||
|
||||
function stop() {
|
||||
kill $CHILD_PID
|
||||
wait $CHILD_PID
|
||||
}
|
||||
|
||||
node $NODE_OPTIONS node_modules/node-red/red.js --userDir /data $FLOWS "${@}" &
|
||||
|
||||
CHILD_PID="$!"
|
||||
|
||||
wait "${CHILD_PID}"
|
||||
@@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
set -ex
|
||||
|
||||
# Installing Devtools
|
||||
if [[ ${TAG_SUFFIX} != *"minimal" ]]; then
|
||||
echo "Installing devtools"
|
||||
apk add --no-cache --virtual devtools build-base linux-headers udev python3
|
||||
else
|
||||
echo "Skip installing devtools"
|
||||
fi
|
||||
@@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
set -ex
|
||||
|
||||
# Remove native GPIO node if exists
|
||||
if [[ -d "/usr/src/node-red/node_modules/@node-red/nodes/core/hardware" ]]; then
|
||||
echo "Removing native GPIO node"
|
||||
rm -r /usr/src/node-red/node_modules/@node-red/nodes/core/hardware
|
||||
else
|
||||
echo "Skip removing native GPIO node"
|
||||
fi
|
||||
Reference in New Issue
Block a user