Setup with config.json not creating admin user as expected
-
I am using "setup --config config.json " to configure NodeBB server, everything works as expected except admin user that is not created with config.json attributes. It just generates a random password.
The following is logged: "Password was not provided during automated setup, generating one.." although I provided the password according with the json bellow:
{ "url": "http://localhost", "port": "4567", "admin:username": "admin", "admin:email": "[email protected]", "admin:password": "password", "admin:password:confirm": "password", "database": "postgres", "postgres": { "host": "docker-database", "port": "5432", "username": "postgres", "password": "pssword", "database": "database", "ssl": "false" } }
Anyone have this problem also?
-
So, I managed to get it working. Just coming here to post what works for me if anyone have the same issue. I try to scape double quotes, stringify, etc.
I had to "unfold (?)" the admin object and then all start working:
{ "url": "${URL}", "port": "${PORT}", "admin":{ "username": "${ADMIN_USERNAME}", "email": "${ADMIN_EMAIL}", "password": "${ADMIN_PASSWORD}", "password:confirm": "${ADMIN_PASSWORD}" }, "database": "${DB_VENDOR}", "${DB_VENDOR}": { "host": "${DB_HOST}", "port": "${DB_PORT}", "username": "${DB_USER}", "password": "${DB_PASSWORD}", "database": "${DB_NAME}", "ssl": "${DB_SSL}" } }
-
So, I managed to get it working. Just coming here to post what works for me if anyone have the same issue. I try to scape double quotes, stringify, etc.
I had to "unfold (?)" the admin object and then all start working:
{ "url": "${URL}", "port": "${PORT}", "admin":{ "username": "${ADMIN_USERNAME}", "email": "${ADMIN_EMAIL}", "password": "${ADMIN_PASSWORD}", "password:confirm": "${ADMIN_PASSWORD}" }, "database": "${DB_VENDOR}", "${DB_VENDOR}": { "host": "${DB_HOST}", "port": "${DB_PORT}", "username": "${DB_USER}", "password": "${DB_PASSWORD}", "database": "${DB_NAME}", "ssl": "${DB_SSL}" } }
-
-