Created
August 10, 2021 07:03
-
-
Save uuhnaut69/e5aae053a319f3f94279f3c93f0dac4a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "3.7" | |
services: | |
mongo: | |
container_name: mongo | |
image: mongo | |
volumes: | |
- ./mongo-init.js:/initiator/mongo-init.js | |
ports: | |
- "27017:27017" | |
entrypoint: [ "/usr/bin/mongod", "--replSet", "rs0", "--bind_ip_all" ] | |
restart: on-failure | |
---------------- | |
// Setup replica set | |
rs.initiate({_id: "rs0", members: [{"_id": 0, "host": "localhost:27017", "priority": 4}]}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment