Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Version History

« Previous Version 2 Next »

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

  1. Create file:

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

    //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, which you will find here. 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.

  • No labels