Configuring MongoDB 'optimserver' Credentials

The MongoDB optimserver credentials are defined in the infrastructure Docker descriptor. They are used by the Optimization server master.

To Configure MongoDB 'optimserver' Credentials

  1. Edit deployment/docker/infra/docker-compose.yml and change the MONGODB_DBOS_PASSWORD environment variable.

    mongo:
        ...
        environment:
        - MONGODB_DBOS_DATABASE=optimserver-master-db
        - MONGODB_DBOS_USER=optimserver
        - MONGODB_DBOS_PASSWORD # Not specifying a value allow to transmit environment variable to the container.
  2. Edit the .env file placed in the docker-compose.yml parent folder and add an environment variable MONGODB_DBOS_PASSWORD with the password you have chosen. Note that you can also add the environment variable to the host machine.

  3. Edit deployment/docker/dbos/docker-compose.yml and change the MONGODB_DBOS_PASSWORD environment variable.

    dbos-master:
    ...
    environment:
      - SPRING_DATA_MONGODB_USERNAME=optimserver
      - SPRING_DATA_MONGODB_PASSWORD # Not specifying a value allow to transmit environment variable to the container.
  4. Edit the .env file placed in the docker-compose.yml parent folder and add an environment variable SPRING_DATA_MONGODB_PASSWORD with the password you have chosen. Note that you can also add the environment variable to the host machine.