Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

In /opt/zw-vmmc-docker/mongo you need to create mongo-init.js:

  1. Create file:

    Code Block
    vim /opt/zw-vmmc-docker/mongo/mongo-init.js
  2. And paste the next lines:

    Code Block
    //mongo Init
    db.createUser(
        {
            user: "<user>",
            pwd: "<pwd>",
            mechanisms: ["SCRAM-SHA-1"],
            roles: [
                {
                    role: "readWrite",
                    db: "prod"
                },
                {
                    role: "readWrite",
                    db: "dev"
                },
                {
                    role: "dbAdmin",
                    db: "dev"
                },
                {
                    role: "dbAdmin",
                    db: "prod"
                }
            ]
        }
    );
  3. You will need to replace “<user>” and “<pwd>” with the user and password existing here: mongo-user // TODO

  4. You will also need to download backups log-backup.gz and prod-backup.gz. Temporally, whichyou will find here(repo or MongoDB Atlas). you can get them from api-dev.psi-connect.org, in the next path: /opt/tomcat/mongo-test-backups And paste in /opt/zw-vmmc-docker/mongo/backups // TODO

About the Mongo configuration, we will finish the configuration when we focus on the docker-compose.yml file.

...