Created
April 1, 2019 09:37
-
-
Save smileboywtu/4f69f315873378996757755fdcee7fe0 to your computer and use it in GitHub Desktop.
monog db replicate with docker compose
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: mvertes/alpine-mongo | |
restart: always | |
ports: | |
- "27017:27017" | |
entrypoint: [ "/usr/bin/mongod", "--port", "27017", "--bind_ip_all", "--replSet", "rs"] | |
mongo2: | |
image: mvertes/alpine-mongo | |
restart: always | |
ports: | |
- "27018:27018" | |
entrypoint: [ "/usr/bin/mongod", "--port", "27018", "--bind_ip_all", "--replSet", "rs"] | |
mongo3: | |
image: mvertes/alpine-mongo | |
restart: always | |
ports: | |
- "27019:27019" | |
entrypoint: [ "/usr/bin/mongod", "--port", "27019", "--bind_ip_all", "--replSet", "rs"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
需要设置hosts: