File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -21,11 +21,14 @@ const setupDefaultUser = () => {
21
21
. then ( ( row ) => {
22
22
if ( ! row . count ) {
23
23
// Create a new user and set password
24
- logger . info ( 'Creating a new user: admin@example.com with password: changeme' ) ;
24
+ let email = process . env . INITIAL_ADMIN_EMAIL || 'admin@example.com' ;
25
+ let password = process . env . INITIAL_ADMIN_PASSWORD || 'changeme' ;
26
+
27
+ logger . info ( 'Creating a new user: ' + email + ' with password: ' + password ) ;
25
28
26
29
let data = {
27
30
is_deleted : 0 ,
28
- email : 'admin@example.com' ,
31
+ email : email ,
29
32
name : 'Administrator' ,
30
33
nickname : 'Admin' ,
31
34
avatar : '' ,
@@ -41,7 +44,7 @@ const setupDefaultUser = () => {
41
44
. insert ( {
42
45
user_id : user . id ,
43
46
type : 'password' ,
44
- secret : 'changeme' ,
47
+ secret : password ,
45
48
meta : { } ,
46
49
} )
47
50
. then ( ( ) => {
You can’t perform that action at this time.
0 commit comments