{"id":17190404,"url":"https://github.com/theworkflow/mongo-rs","last_synced_at":"2026-07-09T02:31:15.168Z","repository":{"id":145706810,"uuid":"64172041","full_name":"theworkflow/mongo-rs","owner":"theworkflow","description":"Creates mongo database host with an optional backup container","archived":false,"fork":false,"pushed_at":"2017-04-18T16:12:35.000Z","size":39,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-10-25T14:35:39.175Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/theworkflow.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2016-07-25T22:28:27.000Z","updated_at":"2017-04-18T19:34:37.000Z","dependencies_parsed_at":"2023-05-16T20:31:08.000Z","dependency_job_id":null,"html_url":"https://github.com/theworkflow/mongo-rs","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/theworkflow/mongo-rs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theworkflow%2Fmongo-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theworkflow%2Fmongo-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theworkflow%2Fmongo-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theworkflow%2Fmongo-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/theworkflow","download_url":"https://codeload.github.com/theworkflow/mongo-rs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theworkflow%2Fmongo-rs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35284875,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-09T02:00:07.329Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-10-15T01:22:28.821Z","updated_at":"2026-07-09T02:31:15.092Z","avatar_url":"https://github.com/theworkflow.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"mongo-rs\n========\n\nCreates mongo database host with an optional backup container\n\n## Installation\n\n```\n$ npm install -g mongo-rs\n```\n\n## Creating mongo database host\n\nOrchestrate a new mongo host that will have a running mongo instance and a backup container. The backup container is optional.\n\n- [Create services](#create-services)\n- [Add admin user to mongo](#create-mongo-admin-user)\n- [Setup replica set](#replica-sets)\n- [Manual docker-compose actions](#manual-docker-compose-actions)\n\n## Create services\n\nTo create the docker containers run the following command and complete the prompts.\n\n```\n$ mongo-rs up\n```\n\nOnce the services have been created the next steps are to [initialize the replica set](#initializing-replica-set), and then [add the admin user](#create-mongo-admin-user).\nOnce those steps are completed, the ability to add members to the replica set will be available.\n\n## Create mongo admin user\n\nThe admin user credentials are populated into the `initMongoUser.js`. The mongo admin user can be created after the `mongo-rs up` command has ran successfully.\n\n```\n$ docker exec -it mongo mongo /opt/conf/initMongoUser.js\n```\n\n## Replica sets\n\n### [Initializing replica set](https://docs.mongodb.com/manual/tutorial/deploy-replica-set/#initiate-the-replica-set)\n\n```\n$ docker exec -it mongo mongo /opt/conf/initRS.js\n```\n\n### [Add Members to Replica Set](https://docs.mongodb.com/manual/reference/method/rs.add/#rs.add)\n\n```\n$ docker exec -it mongo mongo\n\u003e use admin\n\u003e db.auth(\u003cusername\u003e, \u003cpassword\u003e)\n\u003e rs.add({ host: \"\u003cip\u003e:27017\", priority: 0, arbiterOnly: false }) # This will add a secondary\n\u003e rs.addArb(\"\u003cip\u003e:27017\") # This will add an arbiter\n```\n\n## Manual docker-compose actions\n\nAfter all of the services have been created, the manual docker-compose commands can be used.\n\n### Starting docker-compose project\n\nTo manually start the docker-compose project run the command\n```\n$ docker-compose \\\n  --file /opt/conf/{{install}}/docker-compose.yml \\\n  --project-name mongo-rs \\\n  up -d --no-build\n```\n\nThe `install` variable will be the same when prompted for the install name\n\n### Stoping docker-compose project\n\n```\n$ docker-compose \\\n  --file /opt/conf/{{install}}/docker-compose.yml \\\n  --project-name mongo-rs \\\n  down\n```\n\n### Restarting docker-compose project\n\n```\n$ docker-compose \\\n  --file /opt/conf/{{install}}/docker-compose.yml \\\n  --project-name mongo-rs \\\n  restart\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheworkflow%2Fmongo-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftheworkflow%2Fmongo-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheworkflow%2Fmongo-rs/lists"}