-
Notifications
You must be signed in to change notification settings - Fork 1
/
mongodb-replica_set.yml
114 lines (114 loc) · 2.17 KB
/
mongodb-replica_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
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
version: '3.3'
services:
mongo1:
image: mongo:7.0
command:
- --replSet
- rs-ebl
- --tlsMode
- requireTLS
- --tlsCertificateKeyFile
- /run/secrets/ebl01.pem
- --clusterAuthMode
- x509
- --sslCAFile
- /run/secrets/mongoCA.crt
- --tlsAllowConnectionsWithoutCertificates
- --wiredTigerCacheSizeGB=4
ports:
- 27017:27017
volumes:
- db1:/data/db
secrets:
- ebl01.pem
- mongoCA.crt
logging:
driver: json-file
deploy:
placement:
constraints:
- node.hostname == badwcai-ebl01
resources:
limits:
cpus: '2.0'
memory: 12G
mongo2:
image: mongo:7.0
command:
- --replSet
- rs-ebl
- --tlsMode
- requireTLS
- --tlsCertificateKeyFile
- /run/secrets/ebl02.pem
- --clusterAuthMode
- x509
- --sslCAFile
- /run/secrets/mongoCA.crt
- --tlsAllowConnectionsWithoutCertificates
- --wiredTigerCacheSizeGB=4
ports:
- 27018:27017
volumes:
- db2:/data/db
secrets:
- ebl02.pem
- mongoCA.crt
logging:
driver: json-file
deploy:
placement:
constraints:
- node.hostname == badwcai-ebl02
resources:
limits:
cpus: '2.0'
memory: 12G
mongo3:
image: mongo:7.0
command:
- --replSet
- rs-ebl
- --tlsMode
- requireTLS
- --tlsCertificateKeyFile
- /run/secrets/ebl03.pem
- --clusterAuthMode
- x509
- --sslCAFile
- /run/secrets/mongoCA.crt
- --tlsAllowConnectionsWithoutCertificates
- --wiredTigerCacheSizeGB=4
ports:
- 27019:27017
volumes:
- db3:/data/db
secrets:
- ebl03.pem
- mongoCA.crt
logging:
driver: json-file
deploy:
placement:
constraints:
- node.hostname == badwcai-ebl03
resources:
limits:
cpus: '2.0'
memory: 12G
volumes:
db1:
driver: local
db2:
driver: local
db3:
driver: local
secrets:
mongoCA.crt:
external: true
ebl01.pem:
external: true
ebl02.pem:
external: true
ebl03.pem:
external: true