-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
35 lines (35 loc) · 912 Bytes
/
docker-compose.yml
File metadata and controls
35 lines (35 loc) · 912 Bytes
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
33
34
35
version: '3.3'
#https://gist.github.com/harveyconnor/518e088bad23a273cae6ba7fc4643549
services:
mongo1:
hostname: mongo1
container_name: localmongo1
image: mongo
expose:
- 27017
ports:
- 27017:27017
restart: always
entrypoint: ['/usr/bin/mongod', '--bind_ip_all', '--replSet', 'rs0']
volumes:
- ./volumes/mongodb:/data/db # This is where your volume will persist. e.g. VOLUME-DIR = ./volumes/mongodb
mongo2:
hostname: mongo2
container_name: localmongo2
image: mongo
expose:
- 27017
ports:
- 27018:27017
restart: always
entrypoint: ['/usr/bin/mongod', '--bind_ip_all', '--replSet', 'rs0']
mongo3:
hostname: mongo3
container_name: localmongo3
image: mongo
expose:
- 27017
ports:
- 27019:27017
restart: always
entrypoint: ['/usr/bin/mongod', '--bind_ip_all', '--replSet', 'rs0']