{"id":13529648,"url":"https://github.com/minhhungit/mongodb-cluster-docker-compose","last_synced_at":"2025-05-15T12:06:41.586Z","repository":{"id":38410071,"uuid":"198724588","full_name":"minhhungit/mongodb-cluster-docker-compose","owner":"minhhungit","description":"docker-compose for mongodb cluster sharded with replication","archived":false,"fork":false,"pushed_at":"2025-03-17T21:35:25.000Z","size":17705,"stargazers_count":534,"open_issues_count":1,"forks_count":215,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-04-14T20:57:35.392Z","etag":null,"topics":["arbiter","csharp","docker","docker-compose","mongodb","mongodb-cluster","mongodb-replica","mongodb-replica-set","mongodb-sharding","mongodb-sharding-example","netcore"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/minhhungit.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":"FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["minhhungit"],"ko_fi":"minhhungit","custom":["https://www.paypal.me/minhhungit"]}},"created_at":"2019-07-24T23:52:30.000Z","updated_at":"2025-04-11T11:36:24.000Z","dependencies_parsed_at":"2023-01-21T13:00:59.252Z","dependency_job_id":"96ec9232-6f1b-490b-ae7d-394ea9dbfea9","html_url":"https://github.com/minhhungit/mongodb-cluster-docker-compose","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/minhhungit%2Fmongodb-cluster-docker-compose","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/minhhungit%2Fmongodb-cluster-docker-compose/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/minhhungit%2Fmongodb-cluster-docker-compose/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/minhhungit%2Fmongodb-cluster-docker-compose/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/minhhungit","download_url":"https://codeload.github.com/minhhungit/mongodb-cluster-docker-compose/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254337613,"owners_count":22054253,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["arbiter","csharp","docker","docker-compose","mongodb","mongodb-cluster","mongodb-replica","mongodb-replica-set","mongodb-sharding","mongodb-sharding-example","netcore"],"created_at":"2024-08-01T07:00:38.222Z","updated_at":"2025-05-15T12:06:36.574Z","avatar_url":"https://github.com/minhhungit.png","language":"Shell","funding_links":["https://github.com/sponsors/minhhungit","https://ko-fi.com/minhhungit","https://www.paypal.me/minhhungit","https://ko-fi.com/I2I13GAGL'"],"categories":["C# #","Resources"],"sub_categories":["Tutorials"],"readme":"MongoDB [Auto Init] Sharded Cluster with Docker Compose\n=========================================\n\n## Star History\n\n[![Star History Chart](https://api.star-history.com/svg?repos=minhhungit/mongodb-cluster-docker-compose\u0026type=Date)](https://star-history.com/#minhhungit/mongodb-cluster-docker-compose\u0026Date)\n\n\n### PSS Style (Primary -Secondary - Secondary)\n\n- Need PSA? Check [here](https://github.com/minhhungit/mongodb-cluster-docker-compose/tree/master/PSA)\n- If you need to set cluster with keyfile authentication, [check here](https://github.com/minhhungit/mongodb-cluster-docker-compose/tree/Feature/Auth/with-keyfile-auth)\n\n---\n\n## 📖 Table of Contents\n- [❓ Mongo Components?](#-mongo-components-)\n- [✨ Install](#-install-)\n  - [On-liner command](#-on-liner-command)\n  - [Manual step by step](#-manual-step-by-step)\n- [✨ Enable sharding/sharding key for your database](#-enable-shardingsharding-key-for-your-database-)\n- [✅ Verify](#-verify-)\n  - [Verify the status of the sharded cluster](#-verify-the-status-of-the-sharded-cluster-)\n  - [Verify status of replica set for each shard](#-verify-status-of-replica-set-for-each-shard-)\n  - [Check database status](#-check-database-status-)\n- [🔎 More commands](#-more-commands-)\n  - [Normal Startup](#-normal-startup-)\n  - [Resetting the Cluster](#-resetting-the-cluster-)\n  - [Clean up docker-compose](#-clean-up-docker-compose-)\n- [📺 Screenshot](#-screenshot-)\n- [👌 Donate ^^](#-donate--)\n- [📚 Refrences](#-refrences-)\n\n### WARNING (Windows \u0026 OS X) \n\n\u003eThe default Docker setup on Windows and OS X uses a VirtualBox VM to host the Docker daemon. \n\u003eUnfortunately, the mechanism VirtualBox uses to share folders between the host system and \n\u003ethe Docker container is not compatible with the memory mapped files used by MongoDB \n\u003e(see [vbox bug](https://www.virtualbox.org/ticket/819), [docs.mongodb.org](https://docs.mongodb.com/manual/administration/production-\u003enotes/#fsync-on-directories) \n\u003eand related [jira.mongodb.org bug](https://jira.mongodb.org/browse/SERVER-8600)). \n\u003eThis means that it is not possible to run a MongoDB container with the data directory mapped to the host.\n\u003e\n\u003e\u0026#8211; Docker Hub ([source here](https://github.com/docker-library/docs/blob/b78d49c9dffe5dd8b3ffd1db338c62b9e1fc3db8/mongo/content.md#where-to-store-data) \n\u003eor [here](https://github.com/docker-library/mongo/issues/232#issuecomment-355423692))\n---\n\n### Note: \n\nIf you want to modify config files, on Windows you might need to save those file with EOL Conversion Unix (LF) mode. You can use notepad++ to do that [Edit menu =\u003e EOL Conversion =\u003e Unix](https://github.com/minhhungit/mongodb-cluster-docker-compose/tree/master/assets/EOL-unix-mode.png)\n\n\n---\n## ❓ Mongo Components [🔝](#-table-of-contents)\n\n* Config Server (3 member replica set): `configsvr01`,`configsvr02`,`configsvr03`\n* 3 Shards (each a 3 member `PSS` replica set):\n\t* `shard01-a`,`shard01-b`, `shard01-c`\n\t* `shard02-a`,`shard02-b`, `shard02-c`\n\t* `shard03-a`,`shard03-b`, `shard03-c`\n* 2 Routers (mongos): `router01`, `router02`\n\n\u003cimg src=\"https://raw.githubusercontent.com/minhhungit/mongodb-cluster-docker-compose/master/images/sharding-and-replica-sets.png\" style=\"width: 100%;\" /\u003e\n\n## ✨ Install [🔝](#-table-of-contents)\n\n### 👉 On-liner command (convenience)\nClone this repository, open powershell or cmd on the repo folder and run:\n```bash\ndocker-compose up -d \u0026\u0026 while true; do docker exec -it router-01 bash -c \"echo 'sh.status()' | mongosh --port 27017\" \u0026\u0026 break || sleep 2; done\n```\n\n### 👉 Manual step by step\n\n#### Start all of the containers\n\n\u003e I have to remind again in case you missed 😊\n\u003e If you need to set cluster with keyfile authentication, [check here](https://github.com/minhhungit/mongodb-cluster-docker-compose/tree/Feature/Auth/with-keyfile-auth)\n\nClone this repository, open powershell or cmd on the repo folder and run:\n\n```bash\ndocker-compose up -d\n```\n\nThe command will trigger some entrypoint files in `/scripts` folder to init shard cluster/replicas automatically...\n\n#### Verify\n1. Check Cluster Initialization:\n- After starting the cluster, it may take approximately 30 seconds for initialization.\n- If the process takes longer, inspect the container logs for troubleshooting.\n2. Run Verification Command: Use the following command to verify the sharding status:\n```bash\nwhile true; do docker exec -it router-01 bash -c \"echo 'sh.status()' | mongosh --port 27017\" \u0026\u0026 break || sleep 2; done\n```\n\n- This command continuously checks the sharding status using sh.status() on the router-01 container.\n- It retries every 2 seconds until the status is successfully retrieved.\n- Check more at this step [✅ Verify](#-verify-))\n\n\n### ✨ Enable sharding/sharding key for your database [🔝](#-table-of-contents)\n```bash\ndocker-compose exec router01 mongosh --port 27017\n\n// Enable sharding for database `MyDatabase`\nsh.enableSharding(\"MyDatabase\")\n\n// Setup shardingKey for collection `MyCollection`**\ndb.adminCommand( { shardCollection: \"MyDatabase.MyCollection\", key: { oemNumber: \"hashed\", zipCode: 1, supplierId: 1 }, numInitialChunks: 3 } )\n\n```\n\n---\n### ✔️ Done !!!\nBtw, here is mongodb connection string if you want to try to connect mongodb cluster with MongoDB Compass from your host computer (which is running docker)\n\n```\nmongodb://127.0.0.1:27117,127.0.0.1:27118\n```\n\nAnd if you are .NET developer there is a sample READ/WRITE data in mongodb cluster here: [https://github.com/minhhungit/mongodb-cluster-docker-compose/tree/master/client](https://github.com/minhhungit/mongodb-cluster-docker-compose/tree/master/client)\n\n---\n\n### Notes\nIf you get error \"docker.errors.DockerException: Error while fetching server API version\" and \nused WSL (Windows Subsystem for Linux) need to enable 'WSL Integration' for required distro \nin Windows Docker Desktop (Settings -\u003e Resources-\u003e WSL Integration -\u003e Enable integration with required distros).\n\n\u003cimg src=\"https://raw.githubusercontent.com/minhhungit/mongodb-cluster-docker-compose/master/images/wsl2.png\" style=\"width: 100%;\" /\u003e\n\nLink: https://stackoverflow.com/a/65347214/3007147\n\n\nIf you get error like \"E QUERY    [thread1] SyntaxError: unterminated string literal @(shellhelp2)\", problem maybe due to:\n\n\u003eOn Unix, you will get this error if your script has Dos/Windows end of lines (CRLF) instead of Unix end of lines (LF).\n\nTo fix it, modify script files in `scripts` folder, remove newline, change multi line to one line.\n\nOr save the file with Unix mode in notepad++ [Edit menu =\u003e EOL Conversion =\u003e Unix](https://github.com/minhhungit/mongodb-cluster-docker-compose/tree/master/assets/EOL-unix-mode.png)\n\nLink: https://stackoverflow.com/a/51728442/3007147\n\n## 📋 Verify [🔝](#-table-of-contents)\n\n### ✅ Verify the status of the sharded cluster [🔝](#-table-of-contents)\n\n```bash\ndocker-compose exec router01 mongosh --port 27017\nsh.status()\n```\n*Sample Result:*\n```\n  sharding version: {\n        \"_id\" : 1,\n        \"minCompatibleVersion\" : 5,\n        \"currentVersion\" : 6,\n        \"clusterId\" : ObjectId(\"5d38fb010eac1e03397c355a\")\n  }\n  shards:\n        {  \"_id\" : \"rs-shard-01\",  \"host\" : \"rs-shard-01/shard01-a:27017,shard01-b:27017,shard01-c:27017\",  \"state\" : 1 }\n        {  \"_id\" : \"rs-shard-02\",  \"host\" : \"rs-shard-02/shard02-a:27017,shard02-b:27017,shard02-c:27017\",  \"state\" : 1 }\n        {  \"_id\" : \"rs-shard-03\",  \"host\" : \"rs-shard-03/shard03-a:27017,shard03-b:27017,shard03-c:27017\",  \"state\" : 1 }\n  active mongoses:\n        \"4.0.10\" : 2\n  autosplit:\n        Currently enabled: yes\n  balancer:\n        Currently enabled:  yes\n        Currently running:  no\n        Failed balancer rounds in last 5 attempts:  0\n        Migration Results for the last 24 hours:\n                No recent migrations\n  databases:\n        {  \"_id\" : \"config\",  \"primary\" : \"config\",  \"partitioned\" : true }\n```\n\n### ✅ Verify status of replica set for each shard [🔝](#-table-of-contents)\n\u003e You should see 1 PRIMARY, 2 SECONDARY\n\n```bash\ndocker exec -it shard-01-node-a bash -c \"echo 'rs.status()' | mongosh --port 27017\" \ndocker exec -it shard-02-node-a bash -c \"echo 'rs.status()' | mongosh --port 27017\" \ndocker exec -it shard-03-node-a bash -c \"echo 'rs.status()' | mongosh --port 27017\" \n```\n*Sample Result:*\n```ps1\nMongoDB shell version v4.0.11\nconnecting to: mongodb://127.0.0.1:27017/?gssapiServiceName=mongodb\nImplicit session: session { \"id\" : UUID(\"dcfe5d8f-75ef-45f7-9595-9d72dc8a81fc\") }\nMongoDB server version: 4.0.11\n{\n        \"set\" : \"rs-shard-01\",\n        \"date\" : ISODate(\"2019-08-01T06:53:59.175Z\"),\n        \"myState\" : 1,\n        \"term\" : NumberLong(1),\n        \"syncingTo\" : \"\",\n        \"syncSourceHost\" : \"\",\n        \"syncSourceId\" : -1,\n        \"heartbeatIntervalMillis\" : NumberLong(2000),\n        \"optimes\" : {\n                \"lastCommittedOpTime\" : {\n                        \"ts\" : Timestamp(1564642438, 1),\n                        \"t\" : NumberLong(1)\n                },\n                \"readConcernMajorityOpTime\" : {\n                        \"ts\" : Timestamp(1564642438, 1),\n                        \"t\" : NumberLong(1)\n                },\n                \"appliedOpTime\" : {\n                        \"ts\" : Timestamp(1564642438, 1),\n                        \"t\" : NumberLong(1)\n                },\n                \"durableOpTime\" : {\n                        \"ts\" : Timestamp(1564642438, 1),\n                        \"t\" : NumberLong(1)\n                }\n        },\n        \"lastStableCheckpointTimestamp\" : Timestamp(1564642428, 1),\n        \"members\" : [\n                {\n                        \"_id\" : 0,\n                        \"name\" : \"shard01-a:27017\",\n                        \"health\" : 1,\n                        \"state\" : 1,\n                        \"stateStr\" : \"PRIMARY\",\n                        \"uptime\" : 390,\n                        \"optime\" : {\n                                \"ts\" : Timestamp(1564642438, 1),\n                                \"t\" : NumberLong(1)\n                        },\n                        \"optimeDate\" : ISODate(\"2019-08-01T06:53:58Z\"),\n                        \"syncingTo\" : \"\",\n                        \"syncSourceHost\" : \"\",\n                        \"syncSourceId\" : -1,\n                        \"infoMessage\" : \"\",\n                        \"electionTime\" : Timestamp(1564642306, 1),\n                        \"electionDate\" : ISODate(\"2019-08-01T06:51:46Z\"),\n                        \"configVersion\" : 2,\n                        \"self\" : true,\n                        \"lastHeartbeatMessage\" : \"\"\n                },\n                {\n                        \"_id\" : 1,\n                        \"name\" : \"shard01-b:27017\",\n                        \"health\" : 1,\n                        \"state\" : 2,\n                        \"stateStr\" : \"SECONDARY\",\n                        \"uptime\" : 142,\n                        \"optime\" : {\n                                \"ts\" : Timestamp(1564642428, 1),\n                                \"t\" : NumberLong(1)\n                        },\n                        \"optimeDurable\" : {\n                                \"ts\" : Timestamp(1564642428, 1),\n                                \"t\" : NumberLong(1)\n                        },\n                        \"optimeDate\" : ISODate(\"2019-08-01T06:53:48Z\"),\n                        \"optimeDurableDate\" : ISODate(\"2019-08-01T06:53:48Z\"),\n                        \"lastHeartbeat\" : ISODate(\"2019-08-01T06:53:57.953Z\"),\n                        \"lastHeartbeatRecv\" : ISODate(\"2019-08-01T06:53:57.967Z\"),\n                        \"pingMs\" : NumberLong(0),\n                        \"lastHeartbeatMessage\" : \"\",\n                        \"syncingTo\" : \"shard01-a:27017\",\n                        \"syncSourceHost\" : \"shard01-a:27017\",\n                        \"syncSourceId\" : 0,\n                        \"infoMessage\" : \"\",\n                        \"configVersion\" : 2\n                },\n                {\n                        \"_id\" : 2,\n                        \"name\" : \"shard01-c:27017\",\n                        \"health\" : 1,\n                        \"state\" : 2,\n                        \"stateStr\" : \"SECONDARY\",\n                        \"uptime\" : 142,\n                        \"optime\" : {\n                                \"ts\" : Timestamp(1564642428, 1),\n                                \"t\" : NumberLong(1)\n                        },\n                        \"optimeDurable\" : {\n                                \"ts\" : Timestamp(1564642428, 1),\n                                \"t\" : NumberLong(1)\n                        },\n                        \"optimeDate\" : ISODate(\"2019-08-01T06:53:48Z\"),\n                        \"optimeDurableDate\" : ISODate(\"2019-08-01T06:53:48Z\"),\n                        \"lastHeartbeat\" : ISODate(\"2019-08-01T06:53:57.952Z\"),\n                        \"lastHeartbeatRecv\" : ISODate(\"2019-08-01T06:53:57.968Z\"),\n                        \"pingMs\" : NumberLong(0),\n                        \"lastHeartbeatMessage\" : \"\",\n                        \"syncingTo\" : \"shard01-a:27017\",\n                        \"syncSourceHost\" : \"shard01-a:27017\",\n                        \"syncSourceId\" : 0,\n                        \"infoMessage\" : \"\",\n                        \"configVersion\" : 2\n                }\n        ],\n        \"ok\" : 1,\n        \"operationTime\" : Timestamp(1564642438, 1),\n        \"$gleStats\" : {\n                \"lastOpTime\" : Timestamp(0, 0),\n                \"electionId\" : ObjectId(\"7fffffff0000000000000001\")\n        },\n        \"lastCommittedOpTime\" : Timestamp(1564642438, 1),\n        \"$configServerState\" : {\n                \"opTime\" : {\n                        \"ts\" : Timestamp(1564642426, 2),\n                        \"t\" : NumberLong(1)\n                }\n        },\n        \"$clusterTime\" : {\n                \"clusterTime\" : Timestamp(1564642438, 1),\n                \"signature\" : {\n                        \"hash\" : BinData(0,\"AAAAAAAAAAAAAAAAAAAAAAAAAAA=\"),\n                        \"keyId\" : NumberLong(0)\n                }\n        }\n}\nbye\n```\n\n### ✅ Check database status [🔝](#-table-of-contents)\n```bash\ndocker-compose exec router01 mongosh --port 27017\nuse MyDatabase\ndb.stats()\ndb.MyCollection.getShardDistribution()\n```\n\n*Sample Result:*\n```\n{\n        \"raw\" : {\n                \"rs-shard-01/shard01-a:27017,shard01-b:27017,shard01-c:27017\" : {\n                        \"db\" : \"MyDatabase\",\n                        \"collections\" : 1,\n                        \"views\" : 0,\n                        \"objects\" : 0,\n                        \"avgObjSize\" : 0,\n                        \"dataSize\" : 0,\n                        \"storageSize\" : 4096,\n                        \"numExtents\" : 0,\n                        \"indexes\" : 2,\n                        \"indexSize\" : 8192,\n                        \"fsUsedSize\" : 12439990272,\n                        \"fsTotalSize\" : 62725787648,\n                        \"ok\" : 1\n                },\n                \"rs-shard-03/shard03-a:27017,shard03-b:27017,shard03-c:27017\" : {\n                        \"db\" : \"MyDatabase\",\n                        \"collections\" : 1,\n                        \"views\" : 0,\n                        \"objects\" : 0,\n                        \"avgObjSize\" : 0,\n                        \"dataSize\" : 0,\n                        \"storageSize\" : 4096,\n                        \"numExtents\" : 0,\n                        \"indexes\" : 2,\n                        \"indexSize\" : 8192,\n                        \"fsUsedSize\" : 12439994368,\n                        \"fsTotalSize\" : 62725787648,\n                        \"ok\" : 1\n                },\n                \"rs-shard-02/shard02-a:27017,shard02-b:27017,shard02-c:27017\" : {\n                        \"db\" : \"MyDatabase\",\n                        \"collections\" : 1,\n                        \"views\" : 0,\n                        \"objects\" : 0,\n                        \"avgObjSize\" : 0,\n                        \"dataSize\" : 0,\n                        \"storageSize\" : 4096,\n                        \"numExtents\" : 0,\n                        \"indexes\" : 2,\n                        \"indexSize\" : 8192,\n                        \"fsUsedSize\" : 12439994368,\n                        \"fsTotalSize\" : 62725787648,\n                        \"ok\" : 1\n                }\n        },\n        \"objects\" : 0,\n        \"avgObjSize\" : 0,\n        \"dataSize\" : 0,\n        \"storageSize\" : 12288,\n        \"numExtents\" : 0,\n        \"indexes\" : 6,\n        \"indexSize\" : 24576,\n        \"fileSize\" : 0,\n        \"extentFreeList\" : {\n                \"num\" : 0,\n                \"totalSize\" : 0\n        },\n        \"ok\" : 1,\n        \"operationTime\" : Timestamp(1564004884, 36),\n        \"$clusterTime\" : {\n                \"clusterTime\" : Timestamp(1564004888, 1),\n                \"signature\" : {\n                        \"hash\" : BinData(0,\"AAAAAAAAAAAAAAAAAAAAAAAAAAA=\"),\n                        \"keyId\" : NumberLong(0)\n                }\n        }\n}\n```\n\n## 🔎 More commands [🔝](#-table-of-contents)\n\n```bash\ndocker exec -it mongo-config-01 bash -c \"echo 'rs.status()' | mongosh --port 27017\"\n\n\ndocker exec -it shard-01-node-a bash -c \"echo 'rs.help()' | mongosh --port 27017\"\ndocker exec -it shard-01-node-a bash -c \"echo 'rs.status()' | mongosh --port 27017\" \ndocker exec -it shard-01-node-a bash -c \"echo 'rs.printReplicationInfo()' | mongosh --port 27017\" \ndocker exec -it shard-01-node-a bash -c \"echo 'rs.printSlaveReplicationInfo()' | mongosh --port 27017\"\n```\n\n---\n\n### ✦ Normal Startup [🔝](#-table-of-contents)\nThe cluster only has to be initialized on the first run. \n\nSubsequent startup can be achieved simply with `docker-compose up` or `docker-compose up -d`\n\n### ✦ Resetting the Cluster [🔝](#-table-of-contents)\nTo remove all data and re-initialize the cluster, make sure the containers are stopped and then:\n\n```bash\ndocker-compose rm\n```\n\n### ✦ Clean up docker-compose [🔝](#-table-of-contents)\n```bash\ndocker-compose down -v --rmi all --remove-orphans\n```\n\n## 📺 Screenshot [🔝](#-table-of-contents)\n\n\u003cimg src=\"https://raw.githubusercontent.com/minhhungit/mongodb-cluster-docker-compose/master/images/demo.png\" style=\"width: 100%;\" /\u003e\n\u003cimg src=\"https://raw.githubusercontent.com/minhhungit/mongodb-cluster-docker-compose/master/images/demo-03.png\" style=\"width: 100%;\" /\u003e\n\u003cimg src=\"https://raw.githubusercontent.com/minhhungit/mongodb-cluster-docker-compose/master/images/demo-02.png\" style=\"width: 100%;\" /\u003e\n\u003cimg src=\"https://raw.githubusercontent.com/minhhungit/mongodb-cluster-docker-compose/master/images/replicaset-shard-01.png\" style=\"width: 100%;\" /\u003e\n\n---\n\n## 👌 Donate ^^ [🔝](#-table-of-contents)\n**If you like my works and would like to support then you can buy me a coffee ☕️ anytime**\n\n\u003ca href='https://ko-fi.com/I2I13GAGL' target='_blank'\u003e\u003cimg height='36' style='border:0px;height:36px;' src='https://cdn.ko-fi.com/cdn/kofi4.png?v=2' border='0' alt='Buy Me a Coffee at ko-fi.com' /\u003e\u003c/a\u003e \n\n**I would appreciate it ❤️❤️❤️**\n\n---\n## 📚 Refrences [🔝](#-table-of-contents)\n- https://github.com/jfollenfant/mongodb-sharding-docker-compose\n- https://viblo.asia/p/cai-dat-mongo-cluster-voi-docker-m68Z0NN25kG\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fminhhungit%2Fmongodb-cluster-docker-compose","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fminhhungit%2Fmongodb-cluster-docker-compose","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fminhhungit%2Fmongodb-cluster-docker-compose/lists"}