docker-compose-files/mongo_cluster/docker-compose.yml

26 lines
682 B
YAML
Raw Normal View History

2015-07-30 14:54:22 +08:00
# This will boot 4 containers: 3 mongo as a cluster, and 1 to issue mongo commands to others
#
version: "2.2"
services:
mongo3:
image: mongo:3.2
restart: always
entrypoint: [ "/usr/bin/mongod", "--replSet", "rs", "--rest", "--httpinterface" ]
2015-07-30 14:54:22 +08:00
mongo2:
image: mongo:3.2
restart: always
entrypoint: [ "/usr/bin/mongod", "--replSet", "rs", "--rest", "--httpinterface" ]
2015-07-30 14:54:22 +08:00
mongo1:
image: mongo:3.0
restart: always
entrypoint: [ "/usr/bin/mongod", "--replSet", "rs", "--rest", "--httpinterface" ]
2015-07-30 14:54:22 +08:00
mongosetup:
image: mongo:3.0
volumes:
- ./scripts:/scripts
restart: always
entrypoint: [ "bash", "/scripts/mongosetup.sh" ]