blob: 790d3faa95f4fd7b38cb819fabdf1609d448d6e5 (
plain) (
blame)
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
|
# mediawiki-container
A minimalistic container setup for mediawiki using php-fpm and caddy (and unless built to a specific step, [Skin:Citizen](https://www.mediawiki.org/wiki/Skin:Citizen)). Uses openrc in the container. Defaults to using postgres as a backend.
## Helpful Things
- [MediaWiki:Manual:Short_URL](https://www.mediawiki.org/wiki/Manual:Short_URL) (caddy is configured to handle `/wiki/[page]` by default)
- [MediaWiki ShortURL Builder](https://shorturls.redwerks.org/), useful for the `LocalSettings.php` options
- [MediaWiki:Manual:$wgActionPaths](https://www.mediawiki.org/wiki/Manual:$wgActionPaths) for `/edit/[page]` and etc... (requires changing caddy config)
- [MediaWiki:Extension:JsonConfig](https://www.mediawiki.org/wiki/Extension:JsonConfig) (preinstalled but may need to be added to `LocalSettings.php` in some cases)
- [MediaWiki:Manual:Preventing access](https://www.mediawiki.org/wiki/Manual:Preventing_access)
- For non-publicly-readable Wikis, [MediaWiki:Manual:Preventing access#Restrict viewing of all pages](https://www.mediawiki.org/wiki/Manual:Preventing_access#Restrict_viewing_of_all_pages)
- For non-publicly-editable Wikis, [MediaWiki:Manual:Preventing access#Restricting Editing](https://www.mediawiki.org/wiki/Manual:Preventing_access#Restrict_editing)
- For anything using [Extension:Scribunto](https://www.mediawiki.org/wiki/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](https://www.mediawiki.org/wiki/Extension:Scribunto#Lua_error:_Internal_error:_2._on_ARM_architecture)). 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](https://www.mediawiki.org/wiki/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](https://www.mediawiki.org/wiki/Sysadmin_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](https://www.mediawiki.org/wiki/Template:Infobox_Information)
- [StarCitizen:Template:Infobox](https://starcitizen.tools/Template:Infobox) (examples at [StarCitizen:Category:Infobox_templates](https://starcitizen.tools/Category:Infobox_templates))
- based on [Wikipedia:Template:Infobox](https://en.wikipedia.org/wiki/Template:Infobox), but slightly less pain to import
- [Wikipedia:Module:Article_stub_box](https://en.wikipedia.org/wiki/Module:Article_stub_box) and [Wikipedia:Template:Stub](https://en.wikipedia.org/wiki/Template:Stub)
Additionally, all of the below from [Wikipedia:Special:Export](https://en.wikipedia.org/wiki/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](https://en.wikipedia.org/wiki/Category:Wikipedia_metatemplates) category?)
## Credits
Minimally based on https://github.com/Wildsong/docker-caddy-mediawiki.
|