forked from orlandos-nl/MongoKitten
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
48 lines (43 loc) · 877 Bytes
/
docker-compose.yaml
File metadata and controls
48 lines (43 loc) · 877 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
36
37
38
39
40
41
42
43
44
45
46
47
48
version: "3"
services:
mongo-1:
image: mongo:5.0
ports:
- "27017:27017"
container_name: mongo-1
hostname: mongo-1
networks:
- mongo_cluster
command: mongod --replSet rs0
mongo-2:
image: mongo:5.0
ports:
- "27018:27017"
container_name: mongo-2
hostname: mongo-2
networks:
- mongo_cluster
command: mongod --replSet rs0
depends_on:
- mongo-1
mongo-3:
image: mongo:5.0
ports:
- "27019:27017"
container_name: mongo-3
hostname: mongo-3
networks:
- mongo_cluster
command: mongod --replSet rs0
depends_on:
- mongo-2
mongosetup:
image: mongo:5.0
networks:
- mongo_cluster
volumes:
- ./scripts:/scripts
command: bash -c "chmod +x /scripts/setup.sh && /scripts/setup.sh"
networks:
mongo_cluster:
driver: bridge