Closed genxlogics closed 1 year ago
@genxlogics, you can define the database settings using the MicroProfile Config specification, so you can add properties and overwrite it in the environment following the Twelve-Factor App.
For your scenario, you can define the Mongo credentials in the microprofile-config.properties
:
jnosql.mongodb.user=??? # The user’s userID.
jnosql.mongodb.password=??? # The user’s password
jnosql.mongodb.authentication.source=??? # The source where the user is defined.
jnosql.mongodb.authentication.mechanism=??? # Authentication mechanisms com.mongodb.AuthenticationMechanism
Or by defining the environment variables like:
JNOSQL_MONGODB_USER=???
JNOSQL_MONGODB_PASSWORD=???
JNOSQL_MONGODB_AUTHENTICATION_SOURCE=???
JNOSQL_MONGODB_AUTHENTICATION_MECHANISM=???
For more info: https://github.com/eclipse/jnosql-databases#configuration-10
I see the example only shows the mongodb-host property. I wanted to know how to include the mongo credentials to create Configuration object.