Update to Mediawiki 1.35, remove parsoid

also now have to derive the name of extension branches from the
mediawiki major version, rather than having a nice variable for it
This commit is contained in:
Adam Goldsmith 2020-10-13 01:11:53 -04:00
parent ef4c291afe
commit c094c21b43
3 changed files with 22 additions and 45 deletions

View File

@ -1,4 +1,4 @@
FROM mediawiki:latest
FROM mediawiki:1.35
RUN apt-get update \
&& apt-get install -y libldap2-dev libpng-dev git zip \
@ -9,67 +9,58 @@ COPY composer.local.json /var/www/html/
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
RUN cd /var/www/html/ && composer update --no-dev
# Needed for making branch name from MEDIAWIKI_MAJOR_VERSION
SHELL ["/bin/bash", "-c"]
# https://www.mediawiki.org/wiki/Extension:PluggableAuth
RUN git clone --depth 1 -b $MEDIAWIKI_BRANCH \
RUN git clone --depth 1 -b REL${MEDIAWIKI_MAJOR_VERSION/./_} \
https://gerrit.wikimedia.org/r/mediawiki/extensions/PluggableAuth \
/var/www/html/extensions/PluggableAuth
# https://www.mediawiki.org/wiki/Extension:LDAPProvider
RUN git clone --depth 1 \
RUN git clone --depth 1 -b REL${MEDIAWIKI_MAJOR_VERSION/./_} \
https://gerrit.wikimedia.org/r/mediawiki/extensions/LDAPProvider \
/var/www/html/extensions/LDAPProvider
# https://www.mediawiki.org/wiki/Extension:LDAPUserInfo
RUN git clone --depth 1 \
RUN git clone --depth 1 -b REL${MEDIAWIKI_MAJOR_VERSION/./_} \
https://gerrit.wikimedia.org/r/mediawiki/extensions/LDAPUserInfo \
/var/www/html/extensions/LDAPUserInfo
# https://www.mediawiki.org/wiki/Extension:LDAPAuthentication2
RUN git clone --depth 1 \
RUN git clone --depth 1 -b REL${MEDIAWIKI_MAJOR_VERSION/./_} \
https://gerrit.wikimedia.org/r/mediawiki/extensions/LDAPAuthentication2 \
/var/www/html/extensions/LDAPAuthentication2
# https://www.mediawiki.org/wiki/Extension:VisualEditor
RUN git clone --depth 1 -b $MEDIAWIKI_BRANCH \
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor.git \
/var/www/html/extensions/VisualEditor \
&& cd /var/www/html/extensions/VisualEditor \
&& git submodule update --depth 1 --init
# https://www.mediawiki.org/wiki/Extension:MobileFrontend
RUN git clone --depth 1 -b $MEDIAWIKI_BRANCH \
RUN git clone --depth 1 -b REL${MEDIAWIKI_MAJOR_VERSION/./_} \
https://gerrit.wikimedia.org/r/mediawiki/extensions/MobileFrontend \
/var/www/html/extensions/MobileFrontend
# https://www.mediawiki.org/wiki/Extension:NativeSvgHandler
RUN git clone --depth 1 \
https://github.com/p12tic/NativeSvgHandler.git \
RUN git clone --depth 1 -b REL${MEDIAWIKI_MAJOR_VERSION/./_}\
https://gerrit.wikimedia.org/r/mediawiki/extensions/NativeSvgHandler \
/var/www/html/extensions/NativeSvgHandler
# https://www.mediawiki.org/wiki/Extension:CodeMirror
RUN git clone --depth 1 -b $MEDIAWIKI_BRANCH \
RUN git clone --depth 1 -b REL${MEDIAWIKI_MAJOR_VERSION/./_} \
https://gerrit.wikimedia.org/r/mediawiki/extensions/CodeMirror \
/var/www/html/extensions/CodeMirror
# https://www.mediawiki.org/wiki/Extension:Widgets
RUN git clone --depth 1 -b $MEDIAWIKI_BRANCH \
RUN git clone --depth 1 -b REL${MEDIAWIKI_MAJOR_VERSION/./_} \
https://gerrit.wikimedia.org/r/mediawiki/extensions/Widgets \
/var/www/html/extensions/Widgets \
&& cd /var/www/html/extensions/Widgets && composer update --no-dev \
&& chown www-data: compiled_templates/
# https://www.mediawiki.org/wiki/Extension:Semantic_ACL
RUN git clone --depth 1 -b $MEDIAWIKI_BRANCH \
RUN git clone --depth 1 -b REL${MEDIAWIKI_MAJOR_VERSION/./_} \
https://gerrit.wikimedia.org/r/mediawiki/extensions/SemanticACL \
/var/www/html/extensions/SemanticACL
# https://www.mediawiki.org/wiki/Extension:TemplateData
RUN git clone --depth 1 -b $MEDIAWIKI_BRANCH \
https://gerrit.wikimedia.org/r/mediawiki/extensions/TemplateData \
/var/www/html/extensions/TemplateData
# https://www.mediawiki.org/wiki/Extension:External_Data
RUN git clone --depth 1 \
RUN git clone --depth 1 -b REL${MEDIAWIKI_MAJOR_VERSION/./_} \
https://gerrit.wikimedia.org/r/mediawiki/extensions/ExternalData \
/var/www/html/extensions/ExternalData
@ -79,11 +70,14 @@ RUN git clone --depth 1 \
/var/www/html/extensions/QRLite
# https://www.mediawiki.org/wiki/Extension:CSS
RUN git clone --depth 1 -b $MEDIAWIKI_BRANCH \
RUN git clone --depth 1 -b REL${MEDIAWIKI_MAJOR_VERSION/./_} \
https://gerrit.wikimedia.org/r/mediawiki/extensions/CSS \
/var/www/html/extensions/CSS
# https://www.mediawiki.org/wiki/Extension:Variables
RUN git clone --depth 1 -b $MEDIAWIKI_BRANCH \
RUN git clone --depth 1 -b REL${MEDIAWIKI_MAJOR_VERSION/./_} \
https://gerrit.wikimedia.org/r/mediawiki/extensions/Variables \
/var/www/html/extensions/Variables
# reset back to default shell
SHELL ["/bin/sh", "-c"]

View File

@ -144,7 +144,6 @@ wfLoadSkin( 'Timeless' );
# Add more configuration options below.
# Semantic MediaWiki Extension
# require_once "$IP/extensions/SemanticMediaWiki/SemanticMediaWiki.php";
enableSemantics( 'claremontmakerspace.org' );
$smwgPDefaultType = '_txt';
$smwgEnabledQueryDependencyLinksStore = true;
@ -162,7 +161,7 @@ wfLoadExtension( 'ReplaceText' );
#wfLoadExtension( 'UserMerge' );
#$wgGroupPermissions['bureaucrat']['usermerge'] = true;
require_once "$IP/extensions/NativeSvgHandler/NativeSvgHandler.php";
wfLoadExtension( 'NativeSvgHandler' );
wfLoadExtension( 'ParserFunctions' );
@ -213,16 +212,6 @@ $LDAPProviderDomainConfigProvider = function() use ($secrets) {
};
wfLoadExtension( 'VisualEditor' );
$wgDefaultUserOptions['visualeditor-enable'] = 1;
$wgDefaultUserOptions['visualeditor-editor'] = "visualeditor";
# Don't allow users to disable it
//$wgHiddenPrefs[] = 'visualeditor-enable';
# OPTIONAL: Enable VisualEditor's experimental code features
#$wgDefaultUserOptions['visualeditor-enable-experimental'] = 1;
$wgVirtualRestConfig['modules']['parsoid'] = array(
'url' => 'http://parsoid:8000',
'domain' => 'claremontmakerspace',
);
wfLoadExtension( 'TemplateData' );
@ -230,7 +219,7 @@ wfLoadExtension( 'Variables' );
wfLoadExtension( 'CSS' );
require_once "$IP/extensions/Widgets/Widgets.php";
wfLoadExtension( 'Widgets' );
require_once "$IP/extensions/QRLite/QRLite.php";

View File

@ -20,9 +20,3 @@ services:
MYSQL_DATABASE: mediawiki
#MYSQL_USER and MYSQL_PASSWORD in .env
MYSQL_RANDOM_ROOT_PASSWORD: 'yes'
parsoid:
image: thenets/parsoid
restart: always
environment:
PARSOID_DOMAIN_claremontmakerspace: http://mediawiki/api.php
PARSOID_STRICT_SSL: 'false'