Last active
June 2, 2020 15:10
-
-
Save thomasxd24/83fe2a33f5567ebf4186bb79d940ec83 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" | |
services: | |
mongo1: | |
image: mongo:4.2 | |
command: mongod --replSet rs1 --noauth --oplogSize 3 | |
ports: | |
- 27017:27017 | |
environment: | |
TERM: xterm | |
volumes: | |
- /etc/localtime:/etc/localtime:ro | |
- mongo-data-1:/data/db | |
- mongo-config-1:/data/configdb | |
networks: | |
- mongo | |
deploy: | |
replicas: 1 | |
placement: | |
constraints: | |
- node.labels.mongo.replica == 1 | |
mongo2: | |
image: mongo:4.2 | |
command: mongod --replSet rs1 --noauth --oplogSize 3 | |
ports: | |
- 27017:27017 | |
environment: | |
TERM: xterm | |
volumes: | |
- /etc/localtime:/etc/localtime:ro | |
- mongo-data-2:/data/db | |
- mongo-config-2:/data/configdb | |
networks: | |
- mongo | |
deploy: | |
replicas: 1 | |
placement: | |
constraints: | |
- node.labels.mongo.replica == 2 | |
mongo3: | |
image: mongo:4.2 | |
command: mongod --replSet rs1 --noauth --oplogSize 3 | |
ports: | |
- 27017:27017 | |
environment: | |
TERM: xterm | |
volumes: | |
- /etc/localtime:/etc/localtime:ro | |
- mongo-data-3:/data/db | |
- mongo-config-3:/data/configdb | |
networks: | |
- mongo | |
deploy: | |
replicas: 1 | |
placement: | |
constraints: | |
- node.labels.mongo.replica == 3 | |
networks: | |
mongo: | |
volumes: | |
mongo-data-1: | |
mongo-data-2: | |
mongo-data-3: | |
mongo-config-1: | |
mongo-config-2: | |
mongo-config-3: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment