Mongodb on Containers and VMs

anyone worked on installation or Maintenance of DB ? What are the challenges you have faced ?

Hey @Sachin_34902

I used this Docker setup to complete M201

I have been looking at trying to Dockerize an entire Replica set, with authentication enabled, but it has not gone well the few times I have attempted it.
From what I have learned it looks like an bash script is need to handle to setup of the replica set, and re launch after with --auth enabled.
So the docker-compose file needs to launch the mongods without any authentication then have the script setup replica set, than bring them down and back up with authentication.

I am actually looking at doing this with my current production mongodb. It is a stand alone right now. So my steps are going to be something like

  1. Dockerize the stand alone process.
  2. Add it to the swarm stack.
  3. Create 2 new Droplets and add them to the swarm.
  4. Somehow figure out how to get the replica set setup…

As you can read I am not 100% sure on the process. So any input is helpful!

What have you been looking at doing @Sachin_34902?

2 Likes