From ca8b8c00acd6e93472eb0fc8970ddeeb9b32348d Mon Sep 17 00:00:00 2001 From: wizzdom Date: Fri, 28 Feb 2025 19:09:09 +0000 Subject: [PATCH] wiki: use utf8 encoding, improve db performance, more backups --- jobs/services/wiki/LocalSettings.php | 3 ++- jobs/services/wiki/mediawiki-backup.hcl | 6 +++--- jobs/services/wiki/mediawiki.hcl | 17 +++++++++++++++-- 3 files changed, 20 insertions(+), 6 deletions(-) diff --git a/jobs/services/wiki/LocalSettings.php b/jobs/services/wiki/LocalSettings.php index bc0e6ef..1b146e5 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,6 +89,7 @@ wfLoadSkin( 'Vector' ); wfLoadSkin( 'Citizen' ); wfLoadSkin( 'Timeless' ); wfLoadSkin( 'MinervaNeue' ); +wfLoadSkin( 'Medik' ); $wgCitizenThemeColor = "#a81e22"; $wgCitizenShowPageTools = "permission"; 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 = <