Configuring MongoDB 'admin' Credentials
The MongoDB admin credentials are defined in the infrastructure Docker descriptor. They are used for MongoDB database user creation and by the Optimization server master.
To Configure MongoDB 'admin' Credentials
-
Edit
deployment/docker/infra/docker-compose.ymland change theMONGO_INITDB_ROOT_PASSWORDenvironment variable.mongo: ... environment: - MONGO_INITDB_ROOT_USERNAME=admin - MONGO_INITDB_ROOT_PASSWORD # Not specifying a value allow to transmit environment variable to the container. -
Edit the
.envfile placed in thedocker-compose.ymlparent folder and add an environment variableMONGO_INITDB_ROOT_PASSWORDwith the password you have chosen. Note that you can also add the environment variable to the host machine. -
Edit
deployment/docker/dbos/docker-compose.ymland change the environment variableSPRING_DATA_MONGODB_ADMIN_PASSWORD.dbos-master: ... environment: - SPRING_DATA_MONGODB_ADMIN_USER=admin - SPRING_DATA_MONGODB_ADMIN_PASSWORD # Not specifying a value allow to transmit environment variable to the container. -
Edit the
.envfile placed in thedocker-compose.ymlparent folder and add an environment variableMONGODB_DBOS_PASSWORDwith the password you have chosen. Note that you can also add the environment variable to the host machine.