Skip to content

Commit 5137f37

Browse files
committed
config: fix start.sh and update settings
- cleanup start.sh, force the usage of --port option - implement SECRET and TITLE env var
1 parent beb4df0 commit 5137f37

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

settings.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,13 @@ module.exports = function () {
44
uiPort: process.env.PORT || 5000,
55
userDir: ".nodered/",
66
flowFile: "flows.json",
7+
credentialSecret: process.env.SECRET || false,
78
editorTheme: {
89
page: {
910
css: "/app/css/node-red.css"
1011
},
1112
header: {
12-
"title": "Docker node-red",
13+
"title": process.env.TITLE || "Docker node-red",
1314
"image": null,
1415
"url": "#"
1516
}

start.sh

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#!/bin/bash
22
set -xe
33

4-
54
if [[ -n $NODES_URL_FILE ]]; then
65
wget $NODES_URL_FILE -O /tmp/nodes_file.txt
76
cat /tmp/nodes_file.txt | xargs npm install -g
@@ -17,7 +16,6 @@ npm install bcryptjs randomstring when request debug
1716
if [[ -n $AUTH_URL ]]; then
1817
export AUTH_METHOD="http";
1918
echo "Using http based auth!"
20-
cp /app/settings_http.js /app/settings.js
2119
fi
2220
if [[ "$AUTH_METHOD" == "passwd" ]]; then
2321
echo "Using passwd based auth!"
@@ -28,7 +26,4 @@ if [[ -n "$NO_AUTH" ]]; then
2826
export AUTH_METHOD="noauth"
2927
fi
3028

31-
# workaround node-red-admin port
32-
sed -i 's/1880/5000/g' /usr/local/lib/node_modules/node-red-admin/lib/config.js
33-
34-
node-red -s /app/settings.js
29+
node-red -s /app/settings.js --port $PORT

0 commit comments

Comments
 (0)