Mongod configuration

Hello @Sergey_Zelenov1 ,

as you can see there is this flag:

        - --config=/etc/mongodb-config/mongod.conf

This is where the configuration is stored.
If you exec into the container, you would see the file has these parameters and they are actually applied.

This is in my container:

$ cat /etc/mongodb-config/mongod.conf 
systemLog:
  quiet: true
replication:
  oplogSizeMB: 500

As for rs.printReplicationInfo() and the size not changing, have you tried to run replSetResizeOplog? As per mongodb docs:

Once the mongod has created the oplog for the first time, changing the replication.oplogSizeMB option will not affect the size of the oplog. To change the maximum oplog size after starting the mongod, use replSetResizeOplog. replSetResizeOplog enables you to resize the oplog dynamically without restarting the mongod process. To persist the changes made using replSetResizeOplog through a restart, update the value of oplogSizeMB.

1 Like