Last active
May 7, 2019 19:20
-
-
Save luksrn/882a2da8ed23f0997bfcaf2882722ae5 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: | |
rabbitmq: | |
image: rabbitmq:management | |
container_name: rabbitmq | |
networks: | |
- desenv-local | |
ports: | |
- "5672:5672" | |
- "15672:15672" | |
redis: | |
image: redis | |
container_name: redis | |
ports: | |
- "6379:6379" | |
networks: | |
- desenv-local | |
mongodb: | |
hostname: mongodb1 | |
image: mongo | |
container_name: mongodb1 | |
networks: | |
- desenv-local | |
ports: | |
- "27017:27017" | |
entrypoint: [ "/usr/bin/mongod", "--bind_ip_all", "--replSet", "rs0" ] | |
mongodb2: | |
hostname: mongodb2 | |
image: mongo | |
container_name: mongodb2 | |
networks: | |
- desenv-local | |
ports: | |
- "27018:27017" | |
entrypoint: [ "/usr/bin/mongod", "--bind_ip_all", "--replSet", "rs0" ] | |
mongodb3: | |
hostname: mongodb3 | |
image: mongo | |
container_name: mongodb3 | |
networks: | |
- desenv-local | |
ports: | |
- "27019:27017" | |
entrypoint: [ "/usr/bin/mongod", "--bind_ip_all", "--replSet", "rs0" ] | |
dns-proxy: | |
image: defreitas/dns-proxy-server | |
hostname: dns.magedo | |
ports: | |
- 5380:5380 | |
volumes: | |
- "/var/run/docker.sock:/var/run/docker.sock" | |
- "/etc/resolv.conf:/etc/resolv.conf" | |
environment: | |
MG_LOG_LEVEL: ERROR | |
networks: | |
desenv-local: | |
driver: bridge | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Initialize the replica set:
sudo docker exec -it mongodb1 mongo
And run: