File tree Expand file tree Collapse file tree 3 files changed +14
-14
lines changed Expand file tree Collapse file tree 3 files changed +14
-14
lines changed Original file line number Diff line number Diff line change @@ -4,19 +4,15 @@ Docker-node-red
4
4
A docker image to deploy instances of node-red with additional nodes.
5
5
6
6
The following env vars are used to configure the container:
7
+ - NO_AUTH: if set disable any authentication methods
7
8
- AUTH_METHOD: for now only default 'passwd' based auth is supported
8
9
- if `passwd ` method is choice the 'admin' password is generated and display in container log
9
10
- AUTH_URL: the http endpoint to authenticate the user, if option is set the AUTH_METHOD is forced to 'http'
10
- - NO_AUTH: if set disable any authentication methods
11
11
- SECRET: the secret used to encrypt stored credentials, if not set encryption is disabled
12
12
- TITLE: if set override the default "Docker node-red" header title
13
13
14
14
You can also add a 'extra_modules.txt' inside '/app/config' with a list of flow extra.
15
15
16
- TODO
17
- ----
18
- [ ] implement flows backup/restore
19
-
20
16
Dokku
21
17
-------------
22
18
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ module.exports = function () {
16
16
}
17
17
}
18
18
}
19
- if ( process . env . AUTH_METHOD ! = 'noauth' )
19
+ if ( process . env . AUTH_METHOD && process . env . AUTH_METHOD != = 'noauth' )
20
20
obj [ 'adminAuth' ] = require ( './settings_' + process . env . AUTH_METHOD + '.js' )
21
21
22
22
return obj
Original file line number Diff line number Diff line change 13
13
14
14
# we are going to use this in user-auth. install locally
15
15
npm install bcryptjs randomstring when request debug
16
- if [[ -n $AUTH_URL ]]; then
16
+ if [[ -n " $NO_AUTH " ]]; then
17
+ # if NO_AUTH env is set
18
+ echo " *** WARNING: Disable auth ***"
19
+ export AUTH_METHOD=" noauth"
20
+ elif [[ -n $AUTH_URL ]]; then
21
+ # if AUTH_METHOD == http
17
22
export AUTH_METHOD=" http" ;
18
23
echo " Using http based auth!"
19
- fi
20
- if [[ " $AUTH_METHOD " == " passwd" ]]; then
24
+ else
25
+ # set default auth method if nothing else defined
26
+ export AUTH_METHOD=" passwd"
21
27
echo " Using passwd based auth!"
22
28
node /app/gen_password.js
23
29
fi
24
- if [[ -n " $NO_AUTH " ]]; then
25
- echo " *** WARNING: Disable auth ***"
26
- export AUTH_METHOD=" noauth"
27
- fi
28
30
29
- node-red -s /app/settings.js --port $PORT
31
+ env
32
+ echo " debug: Starting nodered... "
33
+ node-red -s /app/settings.js
You can’t perform that action at this time.
0 commit comments