forked from miraheze/mw-config
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDatabase.php
53 lines (52 loc) · 1.38 KB
/
Database.php
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
<?php
$wi->config->settings['wgLBFactoryConf']['default'] = [
'class' => 'LBFactoryMulti',
'sectionsByDB' => $wi->wikiDBClusters,
'sectionLoads' => [
'DEFAULT' => [
'db11' => 1,
],
'c1' => [
'db11' => 1,
],
'c2' => [
'db11' => 1,
],
'c3' => [
'db12' => 1,
],
'c4' => [
'db13' => 1,
],
],
'serverTemplate' => [
'dbname' => $wgDBname,
'user' => $wgDBuser,
'password' => $wgDBpassword,
'type' => 'mysql',
'flags' => DBO_SSL,
// MediaWiki checks if the certificate presented by MariaDB is signed
// by the certificate authority listed in 'sslCAFile'. In emergencies
// this could be set to /etc/ssl/certs/ca-certificates.crt (all trusted
// CAs), but setting this to one CA reduces attack vector and CAs
// to dig through when checking the certificate provided by MariaDB.
'sslCAFile' => '/etc/ssl/certs/Sectigo.crt',
],
'hostsByName' => [
'db11' => 'db11.miraheze.org',
'db12' => 'db12.miraheze.org',
'db13' => 'db13.miraheze.org',
],
'externalLoads' => [
'echo' => [
'db11' => 1, // should echo c1
],
],
'readOnlyBySection' => [
// 'DEFAULT' => 'Maintenance ongoing on the database server.',
//'c1' => 'Maintenance ongoing on the database server.',
//'c2' => 'Maintenance ongoing on the database server.',
//'c3' => 'Maintenance ongoing on the database server.',
//'c4' => 'Maintenance ongoing on the database server.',
],
];