diff --git a/deploy/enterprise/app/nodered/package.json b/deploy/enterprise/app/nodered/package.json new file mode 100644 index 0000000000..c7c6334c95 --- /dev/null +++ b/deploy/enterprise/app/nodered/package.json @@ -0,0 +1,18 @@ +{ + "name": "nodered-app", + "version": "1.0.0", + "private": "true", + "license": "MIT", + "scripts": { + "start": "node-red --settings settings.js" + }, + "dependencies": { + "@steedos/node-red-contrib-steedos": "^2.4.1", + "dotenv-flow": "^3.2.0", + "ioredis": "^5.3.2", + "lodash": "^4.17.21", + "node-red": "^3.0.2", + "node-red-dashboard": "^3.4.0" + } + } + \ No newline at end of file diff --git a/deploy/enterprise/app/nodered/public/index.html b/deploy/enterprise/app/nodered/public/index.html new file mode 100644 index 0000000000..d26359197c --- /dev/null +++ b/deploy/enterprise/app/nodered/public/index.html @@ -0,0 +1,5 @@ + + + Welcome to Steedos Integration. + + \ No newline at end of file diff --git a/deploy/enterprise/app/nodered/settings.js b/deploy/enterprise/app/nodered/settings.js new file mode 100644 index 0000000000..37f6c310ce --- /dev/null +++ b/deploy/enterprise/app/nodered/settings.js @@ -0,0 +1,21 @@ +"use strict"; +const path = require('path'); +const lodash = require('lodash'); + +// Node-Red Configuration +// https://nodered.org/docs/user-guide/runtime/configuration + +process.env.PORT = 3200; + +const storageDir = path.join(process.env.STEEDOS_STORAGE_DIR, "data", "node-red"); + +module.exports = { + flowFile: path.join(storageDir,'flows.json'), + flowFilePretty: true, + credentialSecret: process.env.NODERED_CREDENTIAL_SECRET || 'steedos', + userDir: path.join(storageDir, '.node-red'), + functionGlobalContext: { + lodash + }, + httpStatic: path.join(__dirname, 'public'), +};