minor settings updates and job runners
This commit is contained in:
parent
8c710546af
commit
7146d40ea2
6 changed files with 93 additions and 2 deletions
|
@ -188,5 +188,6 @@ $wgPluggableAuth_Config["Chaostreff Backnang IdP"] = [
|
|||
# for better error reporting - disable while in production
|
||||
#error_reporting( -1 );
|
||||
#ini_set( 'display_errors', 1 );
|
||||
|
||||
#$wgShowExceptionDetails = true;
|
||||
#$wgShowDBErrorBacktrace = true;
|
||||
|
|
|
@ -163,10 +163,13 @@ wfLoadExtension( 'WikiEditor' );
|
|||
wfLoadExtension( 'PluggableAuth' );
|
||||
wfLoadExtension( 'OpenIDConnect' );
|
||||
|
||||
$wgPFEnableStringFunctions = true;
|
||||
|
||||
# SMW config
|
||||
wfLoadExtension( 'SemanticMediaWiki' );
|
||||
enableSemantics( 'wiki.ctbk.de' );
|
||||
|
||||
# Add more configuration options below.
|
||||
$smwgQueryResultCacheType = CACHE_ANYTHING;
|
||||
$wgGroupPermissions['sysop']['smw-admin'] = true;
|
||||
|
||||
# Disable account creation - we only use SSO accounts
|
||||
$wgGroupPermissions['*']['autocreateaccount'] = true;
|
||||
|
@ -185,7 +188,19 @@ $wgPluggableAuth_Config["Chaostreff Backnang IdP"] = [
|
|||
'data' => [
|
||||
'providerURL' => 'https://idp.ctbk.de/realms/ctbk/',
|
||||
'clientID' => 'public_mediawiki',
|
||||
'scope' => [ 'openid', 'profile', 'email', 'groups' ],
|
||||
'clientsecret' => $ctbkClientSecret
|
||||
],
|
||||
# use Keycloak group definitions to manage groups centrally
|
||||
'groupsyncs' => [
|
||||
[
|
||||
'type' => 'mapped',
|
||||
'map' => [
|
||||
'sysop' => [ 'groups' => '/mediawiki/admins' ],
|
||||
'buerocrat' => [ 'groups' => '/mediawiki/admins' ],
|
||||
'interface-admin' => [ 'groups' => '/mediawiki/admins' ]
|
||||
]
|
||||
]
|
||||
]
|
||||
];
|
||||
|
||||
|
@ -202,3 +217,9 @@ $wgHideInterlanguageLinks = false;
|
|||
|
||||
# uncomment this if Semantic MediaWiki property locking is broken
|
||||
#$smwgChangePropagationProtection = false;
|
||||
|
||||
# SVG config
|
||||
$wgFileExtensions[] = 'svg';
|
||||
# This extension will no longer be needed in MediaWiki >= 1.41, then $wgSVGNativeRendering can be used
|
||||
wfLoadExtension( 'NativeSvgHandler' );
|
||||
|
||||
|
|
25
smw-jobs.sh
Executable file
25
smw-jobs.sh
Executable file
|
@ -0,0 +1,25 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# ignore single script failures
|
||||
set +e
|
||||
|
||||
SMW_PATH=$1
|
||||
|
||||
set -x
|
||||
|
||||
# not needed in our current config according to the documentation
|
||||
#php "${SMW_PATH}/maintenance/updateSpecialPages.php" --quiet
|
||||
|
||||
# recommended daily jobs
|
||||
php "${SMW_PATH}/maintenance/rebuildData.php" --shallow-update
|
||||
php "${SMW_PATH}/maintenance/disposeOutdatedEntities.php"
|
||||
php "${SMW_PATH}/maintenance/rebuildPropertyStatistics.php"
|
||||
php "${SMW_PATH}/maintenance/rebuildConceptCache.php" --update --create
|
||||
|
||||
# recommended weekly jobs — we still run them daily to simplify the timers
|
||||
php "${SMW_PATH}/maintenance/rebuildData.php" -d 100
|
||||
php "${SMW_PATH}/maintenance/setupStore.php" --skip-import
|
||||
|
||||
# recommended monthly jobs
|
||||
php "${SMW_PATH}/maintenance/removeDuplicateEntities.php"
|
||||
|
18
system/mediawiki-jobrunner@.service
Normal file
18
system/mediawiki-jobrunner@.service
Normal file
|
@ -0,0 +1,18 @@
|
|||
[Unit]
|
||||
Description=MediaWiki job runner %I
|
||||
Documentation=https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:RunJobs.php
|
||||
|
||||
[Service]
|
||||
User=www-data
|
||||
Group=www-data
|
||||
ExecStart=/usr/bin/php /var/lib/%i/maintenance/runJobs.php --wait --maxjobs=50
|
||||
Restart=always
|
||||
RestartSec=15
|
||||
RuntimeMaxSec=300
|
||||
PrivateDevices=true
|
||||
PrivateTmp=true
|
||||
ProtectHome=read-only
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
13
system/semantic-mediawiki-jobs@.service
Normal file
13
system/semantic-mediawiki-jobs@.service
Normal file
|
@ -0,0 +1,13 @@
|
|||
[Unit]
|
||||
Description=Semantic MediaWiki job runner %I
|
||||
Documentation=https://www.semantic-mediawiki.org/wiki/Help:Cron_jobs
|
||||
|
||||
[Service]
|
||||
User=www-data
|
||||
Group=www-data
|
||||
ExecStart=/usr/local/bin/smw-jobs /var/lib/%i/extensions/SemanticMediaWiki
|
||||
RestartSec=15
|
||||
PrivateDevices=true
|
||||
PrivateTmp=true
|
||||
ProtectHome=read-only
|
||||
|
13
system/semantic-mediawiki-jobs@.timer
Normal file
13
system/semantic-mediawiki-jobs@.timer
Normal file
|
@ -0,0 +1,13 @@
|
|||
[Unit]
|
||||
Description=Semantic MediaWiki job timer %I
|
||||
Documentation=https://www.semantic-mediawiki.org/wiki/Help:Cron_jobs
|
||||
|
||||
[Timer]
|
||||
# run the jobs in the morning, after the backups happen
|
||||
OnCalendar=*-*-* 04:00:00
|
||||
RandomizedDelaySec=1h
|
||||
Unit=semantic-mediawiki-jobs@%i.service
|
||||
|
||||
[Install]
|
||||
WantedBy=timers.target
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue