forked from hantsy/spring-reactive-sample
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mongo-rep-set.yml
32 lines (32 loc) · 901 Bytes
/
mongo-rep-set.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
version: "3"
services:
mongo1:
hostname: mongo1
container_name: localmongo1
image: mongo:4.0-xenial
environment:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: root
MONGO_INITDB_DATABASE: blog
volumes:
- ./mongo-initdb.d:/docker-entrypoint-initdb.d
ports:
- "27017:27017"
restart: always
command: --bind_ip_all --replSet rs0
mongo2:
hostname: mongo2
container_name: localmongo2
image: mongo:4.0-xenial
ports:
- "27018:27017"
restart: always
command: --bind_ip_all --replSet rs0
mongo3:
hostname: mongo3
container_name: localmongo3
image: mongo:4.0-xenial
ports:
- "27019:27017"
restart: always
command: --bind_ip_all --replSet rs0