From 7b769cebfecacbf0b899c83e73e8e7f96b3248b3 Mon Sep 17 00:00:00 2001 From: wizzdom Date: Sat, 1 Mar 2025 01:51:17 +0100 Subject: [PATCH] wiki: use utf8 encoding, improve db performance, more backups (#100) * wiki: use utf8 encoding, improve db performance, more backups * add medik skin colour, logo --- jobs/services/wiki/LocalSettings.php | 6 +++++- jobs/services/wiki/mediawiki-backup.hcl | 6 +++--- jobs/services/wiki/mediawiki.hcl | 17 +++++++++++++++-- 3 files changed, 23 insertions(+), 6 deletions(-) diff --git a/jobs/services/wiki/LocalSettings.php b/jobs/services/wiki/LocalSettings.php index bc0e6ef..bad898e 100644 --- a/jobs/services/wiki/LocalSettings.php +++ b/jobs/services/wiki/LocalSettings.php @@ -41,7 +41,7 @@ $wgDBpassword = "{{ key "mediawiki/db/password" }}"; # MySQL specific settings $wgDBprefix = "rbwiki_"; # MySQL table options to use during installation or update -$wgDBTableOptions = "ENGINE=InnoDB, DEFAULT CHARSET=binary"; +$wgDBTableOptions = "ENGINE=InnoDB, DEFAULT CHARSET=utf8mb4"; ## Shared memory settings $wgMainCacheType = CACHE_NONE; @@ -89,11 +89,15 @@ wfLoadSkin( 'Vector' ); wfLoadSkin( 'Citizen' ); wfLoadSkin( 'Timeless' ); wfLoadSkin( 'MinervaNeue' ); +wfLoadSkin( 'Medik' ); $wgCitizenThemeColor = "#a81e22"; $wgCitizenShowPageTools = "permission"; $wgCitizenSearchDescriptionSource = "pagedescription"; +$wgMedikColor = "#a81e22"; +$wgMedikShowLogo = "main"; + $wgLocalisationUpdateDirectory = "$IP/cache"; # load extensions diff --git a/jobs/services/wiki/mediawiki-backup.hcl b/jobs/services/wiki/mediawiki-backup.hcl index bbef3e3..add8b71 100644 --- a/jobs/services/wiki/mediawiki-backup.hcl +++ b/jobs/services/wiki/mediawiki-backup.hcl @@ -17,7 +17,7 @@ job "mediawiki-backup" { } template { - data = < "${file}" -find /storage/backups/nomad/wiki/mysql/rbwiki-mysql* -ctime +3 -exec rm {} \; || true +find /storage/backups/nomad/wiki/mysql/rbwiki-mysql* -ctime +30 -exec rm {} \; || true if [ -s "$file" ]; then # check if file exists and is not empty echo "Backup successful" @@ -56,7 +56,7 @@ EOH } template { - data = <