Configuring MongoDB 'scenario' Credentials

The MongoDB scenario credentials are defined in the infrastructure Docker descriptor. They are used by the Scenario Scervice.

To Configure MongoDB 'scenario' Credentials

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

    mongo:
        ...
        environment:
        - MONGODB_SCENARIO_DATABASE=scenario-db
        - MONGODB_SCENARIO_USER=scenario
        - MONGODB_SCENARIO_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_SCENARIO_PASSWORD with the password you have chosen. Note that you can also add the environment variable to the host machine.

  3. Edit deployment/docker/app/docker-compose.yml and add a variable SPRING_DATA_MONGODB_PASSWORD for the scenario-service and the data-service.

      scenario-service:
        ...
        environment:
          - SPRING_DATA_MONGODB_HOST=mongo
          - SPRING_DATA_MONGODB_PASSWORD=CHANGE_ME #  <= Your new password
      data-service:
        ...
        environment:
          - SPRING_DATA_MONGODB_HOST=mongo
          - SPRING_DATA_MONGODB_PASSWORD=CHANGE_ME #  <= Your new password