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 = () => {
2121 . then ( ( row ) => {
2222 if ( ! row . count ) {
2323 // 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 ) ;
2528
2629 let data = {
2730 is_deleted : 0 ,
28- email : 'admin@example.com' ,
31+ email : email ,
2932 name : 'Administrator' ,
3033 nickname : 'Admin' ,
3134 avatar : '' ,
@@ -41,7 +44,7 @@ const setupDefaultUser = () => {
4144 . insert ( {
4245 user_id : user . id ,
4346 type : 'password' ,
44- secret : 'changeme' ,
47+ secret : password ,
4548 meta : { } ,
4649 } )
4750 . then ( ( ) => {
You can’t perform that action at this time.
0 commit comments