You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
51 lines
1.4 KiB
YAML
51 lines
1.4 KiB
YAML
version: '3'
|
|
services:
|
|
mongo-2-2:
|
|
container_name: "mongo-2-2"
|
|
image: bitnami/mongodb:latest
|
|
ports:
|
|
- "30022:27017"
|
|
command: mongod --replSet rs2 --shardsvr --port 27017 --oplogSize 16 --noprealloc --smallfiles
|
|
restart: always
|
|
|
|
mongo-2-3:
|
|
container_name: "mongo-2-3"
|
|
image: bitnami/mongodb:latest
|
|
ports:
|
|
- "30023:27017"
|
|
command: mongod --replSet rs2 --shardsvr --port 27017 --oplogSize 16 --noprealloc --smallfiles
|
|
restart: always
|
|
|
|
mongo-2-1:
|
|
container_name: "mongo-2-1"
|
|
image: bitnami/mongodb:latest
|
|
ports:
|
|
- "30021:27017"
|
|
command: mongod --replSet rs2 --shardsvr --port 27017 --oplogSize 16 --noprealloc --smallfiles
|
|
links:
|
|
- mongo-2-2:mongo-2-2
|
|
- mongo-2-3:mongo-2-3
|
|
restart: always
|
|
|
|
mongo-rs2-setup:
|
|
container_name: "mongo-rs2-setup"
|
|
image: bitnami/mongodb:latest
|
|
depends_on:
|
|
- "mongo-2-1"
|
|
- "mongo-2-2"
|
|
- "mongo-2-3"
|
|
links:
|
|
- mongo-2-1:mongo-2-1
|
|
- mongo-2-2:mongo-2-2
|
|
- mongo-2-3:mongo-2-3
|
|
volumes:
|
|
- ./scripts:/scripts
|
|
environment:
|
|
- MONGO1=mongo-2-1
|
|
- MONGO2=mongo-2-2
|
|
- MONGO3=mongo-2-3
|
|
- RS=rs2
|
|
entrypoint: [ "/scripts/setup.sh" ]
|
|
|
|
|