Created
April 13, 2018 21:51
-
-
Save mosheka/d27cf3d2b60fb8f769624ead8cd27c7e to your computer and use it in GitHub Desktop.
This file contains hidden or 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' | |
services: | |
mongo_1: | |
container_name: mongo_1 | |
image: 'bitnami/mongodb:latest' | |
environment: | |
- MONGODB_REPLICA_SET_MODE=primary | |
ports: | |
- "30001:27017" | |
networks: | |
- mongonet | |
mongo_2: | |
container_name: mongo_2 | |
image: 'bitnami/mongodb:latest' | |
depends_on: | |
- mongo_1 | |
environment: | |
- MONGODB_REPLICA_SET_MODE=secondary | |
- MONGODB_PRIMARY_HOST=mongo_1 | |
- MONGODB_PRIMARY_PORT_NUMBER=30001 | |
ports: | |
- "30002:27017" | |
networks: | |
- mongonet | |
mongo_3: | |
container_name: mongo_3 | |
image: 'bitnami/mongodb:latest' | |
depends_on: | |
- mongo_1 | |
environment: | |
- MONGODB_REPLICA_SET_MODE=arbiter | |
- MONGODB_PRIMARY_HOST=mongo_1 | |
- MONGODB_PRIMARY_PORT_NUMBER=30001 | |
ports: | |
- "30003:27017" | |
networks: | |
- mongonet |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment