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-1-2:
|
|
container_name: "mongo-1-2"
|
|
image: bitnami/mongodb:latest
|
|
ports:
|
|
- "30012:27017"
|
|
command: mongod --replSet rs1 --shardsvr --port 27017 --oplogSize 16 --noprealloc --smallfiles
|
|
restart: always
|
|
|
|
mongo-1-3:
|
|
container_name: "mongo-1-3"
|
|
image: bitnami/mongodb:latest
|
|
ports:
|
|
- "30013:27017"
|
|
command: mongod --replSet rs1 --shardsvr --port 27017 --oplogSize 16 --noprealloc --smallfiles
|
|
restart: always
|
|
|
|
mongo-1-1:
|
|
container_name: "mongo-1-1"
|
|
image: bitnami/mongodb:latest
|
|
ports:
|
|
- "30011:27017"
|
|
command: mongod --replSet rs1 --shardsvr --port 27017 --oplogSize 16 --noprealloc --smallfiles
|
|
links:
|
|
- mongo-1-2:mongo-1-2
|
|
- mongo-1-3:mongo-1-3
|
|
restart: always
|
|
|
|
mongo-rs1-setup:
|
|
container_name: "mongo-rs1-setup"
|
|
image: bitnami/mongodb:latest
|
|
depends_on:
|
|
- "mongo-1-1"
|
|
- "mongo-1-2"
|
|
- "mongo-1-3"
|
|
links:
|
|
- mongo-1-1:mongo-1-1
|
|
- mongo-1-2:mongo-1-2
|
|
- mongo-1-3:mongo-1-3
|
|
volumes:
|
|
- ./scripts:/scripts
|
|
environment:
|
|
- MONGO1=mongo-1-1
|
|
- MONGO2=mongo-1-2
|
|
- MONGO3=mongo-1-3
|
|
- RS=rs1
|
|
entrypoint: [ "/scripts/setup.sh" ]
|
|
|
|
|