chore: update to mediawiki 1.37
- Bump dependencies - Remove deprecated dependencies - Use Semantic Media Wiki 4 - Add helper scripts for local testing - Add S3 capabilities - Add RemoteUser capabilities This makes it almost possible to use this image stateless. SMW adds a config file on installation, this is tracked in Issue #2 Co-authored-by: Paul <paul@zom.bi> Reviewed-on: #1
This commit is contained in:
parent
53348c6c8e
commit
5cfd3c1641
4 changed files with 160 additions and 59 deletions
69
Dockerfile
69
Dockerfile
|
@ -1,15 +1,13 @@
|
|||
FROM mediawiki:1.35
|
||||
|
||||
# Plugins are not compatible with composer 2 yet
|
||||
ARG COMPOSER_VERSION=1.10.22
|
||||
FROM mediawiki:1.37.1
|
||||
|
||||
ENV \
|
||||
WG_SITENAME="Test Wiki" \
|
||||
WG_SCRIPT_PATH="" \
|
||||
WG_SERVER="https://wiki.example.com" \
|
||||
SEMANTIC_URL="wiki.example.com" \
|
||||
WG_ENABLE_UPLOADS="false" \
|
||||
WG_ENABLE_EMAIL="false" \
|
||||
WG_ENABLE_UPLOADS="0" \
|
||||
WG_USE_INSTANT_COMMONS="0" \
|
||||
WG_ENABLE_EMAIL="0" \
|
||||
WG_UPLOAD_PATH="/uploads" \
|
||||
WG_META_NAMESPACE="Meta" \
|
||||
WG_LANGUAGE_CODE="en" \
|
||||
|
@ -27,11 +25,21 @@ ENV \
|
|||
WG_SECRET_KEY="0000000000000000000000000000000000000000000000000000000000000000" \
|
||||
WG_EMERGENCY_CONTACT="admin@example.com" \
|
||||
WG_PASSWORD_SENDER="wiki@example.com" \
|
||||
ALLOW_PUBLIC_REGISTRATION="false" \
|
||||
ALLOW_PUBLIC_EDIT="false" \
|
||||
ALLOW_PUBLIC_READ="true" \
|
||||
DISABLE_ICONS="false" \
|
||||
DEBUG="false"
|
||||
ALLOW_PUBLIC_REGISTRATION="0" \
|
||||
ALLOW_AUTO_REGISTRATION="1" \
|
||||
ALLOW_PUBLIC_EDIT="0" \
|
||||
ALLOW_PUBLIC_READ="1" \
|
||||
USE_REMOTE_AUTH="0" \
|
||||
DISABLE_ICONS="0" \
|
||||
S3_ENDPOINT="https://s3.us-east-1.amazonaws.com" \
|
||||
S3_INSECURE="0" \
|
||||
S3_KEY="" \
|
||||
S3_SECRET="" \
|
||||
S3_REGION="us-east-1" \
|
||||
S3_BUCKET_DOMAIN_NAME="\$1.s3.amazonaws.com" \
|
||||
S3_BUCKET_NAME="" \
|
||||
S3_SUBDIRECTORY="" \
|
||||
DEBUG="0"
|
||||
|
||||
# System dependencies for extensions
|
||||
RUN set -eu; \
|
||||
|
@ -59,24 +67,37 @@ RUN set -eu; \
|
|||
# Non-composer based extensions
|
||||
# JsonConfig required by Graph.
|
||||
RUN set -eu; \
|
||||
cd /var/www/html/extensions; \
|
||||
curl https://extdist.wmflabs.org/dist/extensions/JsonConfig-REL1_35-a33f0ce.tar.gz |tar -xz; \
|
||||
curl https://extdist.wmflabs.org/dist/extensions/Graph-REL1_35-cfbc8e6.tar.gz |tar -xz; \
|
||||
curl https://extdist.wmflabs.org/dist/extensions/SubPageList3-REL1_35-df04b70.tar.gz |tar -xz; \
|
||||
curl https://extdist.wmflabs.org/dist/extensions/MsUpload-REL1_35-2c46852.tar.gz |tar -xz; \
|
||||
curl https://extdist.wmflabs.org/dist/extensions/TemplateStyles-REL1_35-dae9271.tar.gz |tar -xz
|
||||
cd /var/www/html/extensions \
|
||||
&& git clone https://github.com/edwardspec/mediawiki-aws-s3.git AWS && bash -c "(cd AWS && git checkout be6887a53a0e0fbe3e129cab8d0bae1bd7820cb2)" \
|
||||
&& curl https://extdist.wmflabs.org/dist/extensions/JsonConfig-REL1_37-becf774.tar.gz |tar -xz \
|
||||
&& curl https://extdist.wmflabs.org/dist/extensions/Graph-REL1_37-5a47efe.tar.gz |tar -xz \
|
||||
&& curl https://extdist.wmflabs.org/dist/extensions/SubPageList3-REL1_37-fae904e.tar.gz |tar -xz \
|
||||
&& curl https://extdist.wmflabs.org/dist/extensions/MsUpload-REL1_37-1698666.tar.gz |tar -xz \
|
||||
&& curl https://extdist.wmflabs.org/dist/extensions/TemplateStyles-REL1_37-eec8c6c.tar.gz |tar -xz \
|
||||
&& curl https://extdist.wmflabs.org/dist/extensions/Auth_remoteuser-REL1_37-267291a.tar.gz |tar -xz
|
||||
|
||||
# Install composer packages
|
||||
COPY --from=composer:2.1 /usr/bin/composer /usr/bin/composer
|
||||
RUN set -eu; \
|
||||
curl -o /tmp/composer-setup.php https://getcomposer.org/installer; \
|
||||
curl -o /tmp/composer-setup.sig https://composer.github.io/installer.sig; \
|
||||
php -r "if (hash('SHA384', file_get_contents('/tmp/composer-setup.php')) !== trim(file_get_contents('/tmp/composer-setup.sig'))) { unlink('/tmp/composer-setup.php'); echo 'Invalid installer' . PHP_EOL; exit(1); }"; \
|
||||
php /tmp/composer-setup.php --no-ansi --install-dir=/usr/local/bin --filename=composer --version=${COMPOSER_VERSION}; \
|
||||
rm -rf /tmp/composer-setup.php; \
|
||||
ln -s /var/www/conf/LocalSettings.local.php /var/www/html/LocalSettings.local.php; \
|
||||
ln -s /var/www/conf/LocalSettings.php /var/www/html/LocalSettings.php
|
||||
COPY composer.local.json /var/www/html
|
||||
RUN composer update --no-dev
|
||||
|
||||
# Make AWS (S3) dependencies installable
|
||||
RUN echo '{"extra": {"merge-plugin": {"include": ["extensions/AWS/composer.json"]}}}' > composer.local.json
|
||||
|
||||
# Install SMB via composer
|
||||
# css-sanitizer is a dependency of TemplateStyles
|
||||
RUN composer require --with-all-dependencies --no-update \
|
||||
wikimedia/css-sanitizer:"3.0.2" \
|
||||
mediawiki/semantic-media-wiki:"~4.0.0" \
|
||||
mediawiki/semantic-result-formats:"~4.0.1" \
|
||||
mediawiki/maps:"~9.0.7" \
|
||||
mediawiki/mermaid:"~3.0.1" \
|
||||
mediawiki/semantic-extra-special-properties:"~3.0.1" \
|
||||
mediawiki/semantic-compound-queries:"~2.2.0" \
|
||||
mediawiki/page-forms:"~5.3.4" \
|
||||
mediawiki/semantic-scribunto:"~2.2.0"
|
||||
RUN composer update
|
||||
|
||||
# Place config files
|
||||
COPY conf/* /var/www/conf/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue