Configuring MongoDB 'permission' Credentials

The MongoDB permission credentials are defined in the infrastructure Docker descriptor. They are used to manage permissions.

To Configure MongoDB 'permission' Credentials

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

    mongo:
        ...
        environment:
        - MONGODB_PERMISSION_DATABASE=permission-db
        - MONGODB_PERMISSION_USER=permission
        - MONGODB_PERMISSION_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_PERMISSION_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 SERVICES_PERMISSION_MONGODB_PASSWORD for the backend-service, the data-service, the execution-service, and the scenario-service.

    backend-service:
        ...
        environment:
        - SERVICES_PERMISSION_MONGODB_HOST=mongo
        - SERVICES_PERMISSION_MONGODB_PASSWORD # Not specifying a value allow to transmit environment variable to the container.
    data-service:
        ...
        environment:
        - SERVICES_PERMISSION_MONGODB_HOST=mongo
        - SERVICES_PERMISSION_MONGODB_PASSWORD # Not specifying a value allow to transmit environment variable to the container.
    execution-service:
        ...
        environment:
        - SERVICES_PERMISSION_MONGODB_HOST=mongo
        - SERVICES_PERMISSION_MONGODB_PASSWORD # Not specifying a value allow to transmit environment variable to the container.
    scenario-service:
        ...
        environment:
        - SERVICES_PERMISSION_MONGODB_HOST=mongo
        - SERVICES_PERMISSION_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 SERVICES_PERMISSION_MONGODB_PASSWORD with the password you have chosen. Note that you can also add the environment variable to the host machine.