Merge pull request 'feat: update mediawiki to 1.41.0, enable new extension TemplateStyles' (#95) from feat/mediawiki-updates into main

Reviewed-on: pub-solar/infra#95
Reviewed-by: b12f <b12f@noreply.git.pub.solar>
This commit is contained in:
teutat3s 2024-01-08 17:12:23 +00:00
commit 95f224a9b7
Signed by: pub.solar gitea
GPG key ID: F0332B04B7054873
2 changed files with 36 additions and 4 deletions

31
docs/mediawiki-updates.md Normal file
View file

@ -0,0 +1,31 @@
# Updating mediawiki docker container
See the [mediawiki-oidc-docker repository](https://git.pub.solar/pub-solar/mediawiki-oidc-docker#updating-the-docker-image)
for instructions on updating our customized mediawiki docker image.
To deploy a new docker image to `nachtigall`, first bump the mediawiki version
of the docker image tag in `hosts/nachtigall/apps/mediawiki.nix` (search for
`image`).
Next, push your changes to https://git.pub.solar and get them reviewed and
approved.
After approval, create a fresh backup of the database and deploy the changes to
`nachtigall`:
```
ssh barkeeper@nachtigall.pub.solar
sudo -u postgres pg_dump --create -Fc mediawiki > mediawiki-db-$(date +%F).dump
exit
```
```
deploy --targets '.#nachtigall'
```
Then, finalize the update by running the database migration script:
```
ssh barkeeper@nachtigall.pub.solar
docker exec -it mediawiki bash
php maintenance/run.php update.php
```

View file

@ -40,7 +40,7 @@
## The URL path to the logo. Make sure you change this from the default, ## The URL path to the logo. Make sure you change this from the default,
## or else you'll overwrite your logo when you upgrade! ## or else you'll overwrite your logo when you upgrade!
$wgLogo = "$wgResourceBasePath/resources/assets/wiki.png"; $wgLogo = "https://pub.solar/assets/pubsolar.svg";
## UPO means: this is also a user preference option ## UPO means: this is also a user preference option
@ -73,7 +73,7 @@
$wgImageMagickConvertCommand = "/usr/bin/convert"; $wgImageMagickConvertCommand = "/usr/bin/convert";
# InstantCommons allows wiki to use images from https://commons.wikimedia.org # InstantCommons allows wiki to use images from https://commons.wikimedia.org
$wgUseInstantCommons = false; $wgUseInstantCommons = true;
# Periodically send a pingback to https://www.mediawiki.org/ with basic data # Periodically send a pingback to https://www.mediawiki.org/ with basic data
# about this MediaWiki instance. The Wikimedia Foundation shares this data # about this MediaWiki instance. The Wikimedia Foundation shares this data
@ -114,11 +114,12 @@
wfLoadExtension('OpenIDConnect'); wfLoadExtension('OpenIDConnect');
wfLoadExtension('PluggableAuth'); wfLoadExtension('PluggableAuth');
wfLoadExtension('VisualEditor'); wfLoadExtension('VisualEditor');
wfLoadExtension('TemplateStyles');
wfLoadExtension('QuickInstantCommons');
# End of automatically generated settings. # End of automatically generated settings.
# Add more configuration options below. # Add more configuration options below.
$wgLogo = "https://pub.solar/assets/pubsolar.svg";
$wgLogos = [ $wgLogos = [
'svg' => "https://pub.solar/assets/pubsolar.svg", 'svg' => "https://pub.solar/assets/pubsolar.svg",
'icon' => "https://pub.solar/assets/pubsolar.svg", 'icon' => "https://pub.solar/assets/pubsolar.svg",
@ -207,7 +208,7 @@ in {
backend = "docker"; backend = "docker";
containers."mediawiki" = { containers."mediawiki" = {
image = "git.pub.solar/pub-solar/mediawiki-oidc-docker:latest"; image = "git.pub.solar/pub-solar/mediawiki-oidc-docker:1.41.0";
user = "1000:${builtins.toString gid}"; user = "1000:${builtins.toString gid}";
autoStart = true; autoStart = true;