This repository has been archived by the owner on Oct 8, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
compose.yaml
116 lines (104 loc) · 2.37 KB
/
compose.yaml
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
x-default-mongo: &default-mongo
image: mongo:6.0.5
restart: no
networks:
- mongo-network
services:
mongos-router:
<<: *default-mongo
command: mongos -f /app/mongos.conf
environment:
MONGO_USER: "${MONGO_USER}"
MONGO_PASSWORD: "${MONGO_PASSWORD}"
depends_on:
- mongo-csrs-node1
- mongo-rs1-node1
- mongo-rs2-node1
networks:
- mongo-network
- polynotes-network
volumes:
- mongos-router:/data/db
- ./mongo/router:/app
# Mongo configurations
## RS0
mongo-csrs-node1:
<<: *default-mongo
command: mongod -f /app/mongod.conf
depends_on:
- mongo-csrs-node2
- mongo-csrs-node3
volumes:
- mongo-csrs-node1:/data/db
- ./mongo/csrs:/app
mongo-csrs-node2:
<<: *default-mongo
command: mongod -f /app/mongod.conf
volumes:
- mongo-csrs-node2:/data/db
- ./mongo/csrs:/app
mongo-csrs-node3:
<<: *default-mongo
command: mongod -f /app/mongod.conf
volumes:
- mongo-csrs-node3:/data/db
- ./mongo/csrs:/app
# Mongo sharded replica sets (2)
## RS1
mongo-rs1-node1:
<<: *default-mongo
command: mongod -f /app/mongod.conf
depends_on:
- mongo-rs1-node2
- mongo-rs1-node3
volumes:
- mongo-rs1-node1:/data/db
- ./mongo/rs1:/app
mongo-rs1-node2:
<<: *default-mongo
command: mongod -f /app/mongod.conf
volumes:
- mongo-rs1-node2:/data/db
- ./mongo/rs1:/app
mongo-rs1-node3:
<<: *default-mongo
command: mongod -f /app/mongod.conf
volumes:
- mongo-rs1-node3:/data/db
- ./mongo/rs1:/app
## RS2
mongo-rs2-node1:
<<: *default-mongo
command: mongod -f /app/mongod.conf
depends_on:
- mongo-rs2-node2
- mongo-rs2-node3
volumes:
- mongo-rs2-node1:/data/db
- ./mongo/rs2:/app
mongo-rs2-node2:
<<: *default-mongo
command: mongod -f /app/mongod.conf
volumes:
- mongo-rs2-node2:/data/db
- ./mongo/rs2:/app
mongo-rs2-node3:
<<: *default-mongo
command: mongod -f /app/mongod.conf
volumes:
- mongo-rs2-node3:/data/db
- ./mongo/rs2:/app
networks:
mongo-network:
polynotes-network:
volumes:
mongos-router:
mongo-csrs-node1:
mongo-csrs-node2:
mongo-csrs-node3:
mongo-rs1-node1:
mongo-rs1-node2:
mongo-rs1-node3:
mongo-rs2-node1:
mongo-rs2-node2:
mongo-rs2-node3: