Data Engineering, Data Science, Mongodb, Python, DevOps.
-it mongodb_master mongosh --eval "rs.initiate({ _id: \"my_cluster\", members: [ {_id: 0, host: \"mongodb_master\"}, {_id: 1, host: \"mongodb_worker1\"}, {_id: 2, host: \"mongodb_worker2\"} ] })" To make the deployment easier, we can add this command to a bash file called execute.sh. Then create a