mediawiki-container
A minimalistic container setup for mediawiki using php-fpm and caddy (and unless built to a specific step, Skin:Citizen). Uses openrc in the container. Defaults to using postgres as a backend.
Helpful Things
- MediaWiki:Manual:Short_URL (caddy is configured to handle
/wiki/[page]
by default)- MediaWiki ShortURL Builder, useful for the
LocalSettings.php
options - MediaWiki:Manual:$wgActionPaths for
/edit/[page]
and etc... (requires changing caddy config)
- MediaWiki ShortURL Builder, useful for the
- MediaWiki:Extension:JsonConfig (preinstalled but may need to be added to
LocalSettings.php
in some cases) - MediaWiki:Manual:Preventing access
- For non-publicly-readable Wikis, MediaWiki:Manual:Preventing access#Restrict viewing of all pages
- For non-publicly-editable Wikis, MediaWiki:Manual:Preventing access#Restricting Editing
- For anything using Extension:Scribunto, due to this setup being Alpine-based, you need to specify the system's lua in
LocalSettings.php
(similarly to how it's required on ARM). This can be done with$wgScribuntoEngineConf['luastandalone']['luaPath'] = '/usr/bin/lua5.1';
- In future, we may symlink the preinstalled Lua to the system one.
- MediaWiki:Manual:$wgShowExceptionDetails for if error details are hidden and you need to show them. Should be
false
during day-to-day operations. - MediaWiki:Syadmin Hub
Useful Pages to Copy
You can use Special:Import (on your wiki) and Special:Export (on external wikis) to copy templates (although this does require a lot of effort sometimes).
Some useful ones have been added below:
- MediaWiki:Template:Infobox Information
- StarCitizen:Template:Infobox (examples at StarCitizen:Category:Infobox_templates)
- based on Wikipedia:Template:Infobox, but slightly less pain to import
- Wikipedia:Module:Article_stub_box and Wikipedia:Template:Stub
Additionally, all of the below from Wikipedia:Special:Export:
Module:Citation
Module:Hatnote
Module:Unsubst
Module:Sidebar
Module:Message_box
Module:Navbox
Module:Arguments
Module:Yesno
Module:Authority_control
Module:Infobox
Module:Navbar
Module:InfoboxImage
Module:Check_for_unknown_parameters
Module:If_empty
The Wikipedia Shenanigans
If all of this sounds fun, here's a complete list for the Wikipedia stuff:
Template:Stub
Module:Citation
Module:Hatnote
Module:Unsubst
Module:Sidebar
Module:Message_box
Module:Navbox
Module:Arguments
Module:Yesno
Module:Authority_control
Module:Infobox
Module:Navbar
Module:InfoboxImage
Module:Check_for_unknown_parameters
Module:If_empty
Template:Infobox_Information
Template:Infobox
Module:Article_stub_box
Template:Stub
(TODO: maybe also include all pages in the Wikipedia:Category:Wikipedia_metatemplates category?)
Credits
Minimally based on https://github.com/Wildsong/docker-caddy-mediawiki.