offspot / mediawiki-docker Goto Github PK
View Code? Open in Web Editor NEWAll Mediawiki services in one Docker image
Home Page: https://ghcr.io/offspot/mediawiki
License: GNU General Public License v3.0
All Mediawiki services in one Docker image
Home Page: https://ghcr.io/offspot/mediawiki
License: GNU General Public License v3.0
instead of the real user IP (which should be taken from the reverse-proxy via the x-forwarded-for
HTTP request header:
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-For
An image is stored at https://hub.docker.com/r/openzim/mediawiki. This image seems not updated, so here are the questions:
I don't know if other pages are impacted, but I suspect yes. This is not a problem with the RAM.
This is really important. This should also include the commands about how to create the venv. A requirements file (for pip) should also be created to list Python (3?) deps.
On wiki.openzim.org, both are missing, and it seems there is not place in the Docker volume to place them.
ex : add_mw_extension -v 1.31 -p /var/www/html
Math Echo Thanks` to install 3 extensions in 1 command
Currently, and following the doc, the nginx listen on 80 within the Docker put is rooted to 8080 outside the docker. The problem of this is that any redirection is broken, because redirection are created on the fly assuming port 80, so people get a wrong redirection. For example, it you type http://localhost:8080/
in your browser, you will be redirected to http://localhost:80/wiki/
and you should get http://localhost:8080/wiki/
MediaWiki has many way to install extension : tarball, git, Composer (script PHP) *. Check if we can use exclusively Composer for all used extension
I have been updating translations on wiki.kiwix.org and the jobs related to translation seems to not run. I have runJobs.php then manually and problem was solved. I'm wondering if this would not be a better idea to run the jobs manually each minutes, see https://www.mediawiki.org/wiki/Manual:Job_queue
$ grep "LANG" LocalSettings.*
LocalSettings.custom.php:$LANG_EXT = "$IP/extensions/";
LocalSettings.custom.php:require_once( "$LANG_EXT/Babel/Babel.php" );
LocalSettings.custom.php:require_once( "$LANG_EXT/cldr/cldr.php" );
LocalSettings.custom.php:require_once( "$LANG_EXT/CleanChanges/CleanChanges.php" );
LocalSettings.custom.php:require_once( "$LANG_EXT/LocalisationUpdate/LocalisationUpdate.php" );
LocalSettings.custom.php:require_once( "$LANG_EXT/Translate/Translate.php" );
LocalSettings.custom.php:require_once( "$LANG_EXT/UniversalLanguageSelector/UniversalLanguageSelector.php" );
at least for our online wikis
Whatever the page from where I start the visual editor, the VE progress bar seems to stop at around 70% charging, and then nothing happen anymore.
To optimize the database:
https://www.mediawiki.org/wiki/Manual:Sqlite.php
To migrate the openzim mediawiki to this docker image, we need additional extensions :
I have configured mailgun but if I send an email from "user:Kelson", then I get a PHP error.
The link in the sidebar:
https://mediawiki.openzim.org/wiki/Special:Upload
fails
But:
https://mediawiki.openzim.org/index.php?title=Special:Upload
works
There is a problem I guess in the reverse proxy configuration.
A few remarks about that:
/
level (for example if you want to setup something like /favicon.png
, Wikipedia has moved the Mediawiki on the w/
and `wiki/ paths I would recommend to stick to that configuration. I think WikiFundi was also configured that way.Probably because the Extension:Widgets is not installed https://www.mediawiki.org/wiki/Extension:Widgets
Very new to this.
I want to install a custom skin and have updated the localsettings.custom.php but where do I upload the skin files to?
Do I need to mount a different volume for this?
For example at https://www.openzim.org/wiki/OpenZIM?veaction=edit, the image is not found.
Improve the export data script we already have to:
In the top-right search suggestions are broken, I never get anything at https://mediawiki.openzim.org. If you compare with for example http://wiki.kiwix.org, you will see it work there. I suspect that an extension is responsible for that and has not been installed properly.
This seems unecessary
To solve kiwix/web#12 I need to put more files at the root. The solution for favicon.png
and logo.png
should be done in a more generic manner.
Pardon a possiby stupid question.
I have Wikipedia xml data dump downloaded from here.
Is there a way to use it with this solution?
Are there any conversion steps necessary?
If no - how can I get the most recent wikipedia data for this solution?
With the 1.32
release of Mediawiki, MwEmbedSupport has been archived and is thus not available through the API.
Docker build thus fails at add_mw_extension step.
This is necessary in following wikis:
To create page base on widget of library.kiwix.org, see kiwix/libkiwix#585
Please create a key for library.kiwix,org and dev.library.kiwix.org, more details at https://www.mediawiki.org/wiki/Extension:Iframe
Here is an example of virtualhost configuration
server {
listen 443 ssl;
server_name wiki.kiwix.org;
# SSL
ssl_certificate /etc/letsencrypt/live/wiki.kiwix.org/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/wiki.kiwix.org/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
# access_log off;
proxy_buffering on;
proxy_cache nginx_cache;
proxy_cache_min_uses 2;
proxy_connect_timeout 5;
proxy_send_timeout 90;
proxy_read_timeout 600;
client_max_body_size 0;
set_real_ip_from 127.0.0.1;
set_real_ip_from 88.190.13.50;
real_ip_header X-Forwarded-For;
location /w/images/ {
alias /var/www/www.kiwix.org/w/images/;
expires max;
}
location /w/skins/ {
alias /var/www/www.kiwix.org/w/skins/;
expires max;
}
location /logo.png {
alias /var/www/www.kiwix.org/logo.png;
expires max;
}
location /favicon.ico {
alias /var/www/www.kiwix.org/favicon.ico;
expires max;
}
location /robots.txt {
alias /var/www/www.kiwix.org/robots.txt;
expires max;
}
location /library.xml {
return 301 $scheme://download.kiwix.org/library$request_uri;
}
location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_pass http://localhost:82;
proxy_set_header Host $host;
}
}
With 1.36.1 upgrade, Mailgun extension had to be disabled because one of its dependency (Guzzle) was conflicting with Mediawiki which also depends on it.
The problem is that both MW and MailGun bundle it separately but the Mailgun version is found by MW and attempted to use. The two different versions have a different API and this crashes every webpage to be displayed.
This looks like a problem that would commonly arise so there are probably solutions for this. Needs to be looked into.
Upstream Ticket I guess: https://phabricator.wikimedia.org/T263748
Sample Error:
MediaWiki internal error.
Original exception: [65f52eb171cb6c6e697e9ed8] /wiki/Special:MyLanguage/Main_Page Error: Call to undefined method GuzzleHttp\Utils::chooseHandler()
Backtrace:
from /var/www/html/w/vendor/guzzlehttp/guzzle/src/functions.php(61)
#0 /var/www/html/w/extensions/Mailgun/vendor/guzzlehttp/guzzle/src/HandlerStack.php(42): GuzzleHttp\choose_handler()
#1 /var/www/html/w/includes/http/GuzzleHttpRequest.php(164): GuzzleHttp\HandlerStack::create(NULL)
#2 /var/www/html/w/includes/filerepo/ForeignAPIRepo.php(531): GuzzleHttpRequest->execute()
#3 /var/www/html/w/includes/filerepo/ForeignAPIRepo.php(575): ForeignAPIRepo::httpGet(string, string, array, NULL)
#4 /var/www/html/w/includes/libs/objectcache/wancache/WANObjectCache.php(1707): ForeignAPIRepo->{closure}(boolean, integer, array, NULL, array)
#5 /var/www/html/w/includes/libs/objectcache/wancache/WANObjectCache.php(1539): WANObjectCache->fetchOrRegenerate(string, integer, Closure, array, array)
#6 /var/www/html/w/includes/filerepo/ForeignAPIRepo.php(585): WANObjectCache->getWithSetCallback(string, integer, Closure, array)
#7 /var/www/html/w/includes/filerepo/ForeignAPIRepo.php(199): ForeignAPIRepo->httpGetCached(string, array)
#8 /var/www/html/w/includes/filerepo/file/ForeignAPIFile.php(65): ForeignAPIRepo->fetchImageQuery(array)
#9 /var/www/html/w/includes/filerepo/FileRepo.php(431): ForeignAPIFile::newFromTitle(Title, ForeignAPIRepo)
#10 /var/www/html/w/includes/filerepo/ForeignAPIRepo.php(115): FileRepo->newFile(Title, boolean)
#11 /var/www/html/w/includes/filerepo/FileRepo.php(471): ForeignAPIRepo->newFile(Title)
#12 /var/www/html/w/includes/filerepo/RepoGroup.php(161): FileRepo->findFile(Title, array)
#13 /var/www/html/w/includes/BadFileLookup.php(71): RepoGroup->findFile(Title)
#14 /var/www/html/w/includes/parser/Parser.php(2616): MediaWiki\BadFileLookup->isBadFile(string, Title)
#15 /var/www/html/w/includes/parser/Parser.php(2379): Parser->handleInternalLinks2(string)
#16 /var/www/html/w/includes/parser/Parser.php(1578): Parser->handleInternalLinks(string)
#17 /var/www/html/w/includes/parser/Parser.php(639): Parser->internalParse(string)
#18 /var/www/html/w/includes/content/WikitextContent.php(375): Parser->parse(string, Title, ParserOptions, boolean, boolean, integer)
#19 /var/www/html/w/includes/content/AbstractContent.php(591): WikitextContent->fillParserOutput(Title, integer, ParserOptions, boolean, ParserOutput)
#20 /var/www/html/w/includes/Revision/RenderedRevision.php(263): AbstractContent->getParserOutput(Title, integer, ParserOptions, boolean)
#21 /var/www/html/w/includes/Revision/RenderedRevision.php(235): MediaWiki\Revision\RenderedRevision->getSlotParserOutputUncached(WikitextContent, boolean)
#22 /var/www/html/w/includes/Revision/RevisionRenderer.php(217): MediaWiki\Revision\RenderedRevision->getSlotParserOutput(string, array)
#23 /var/www/html/w/includes/Revision/RevisionRenderer.php(154): MediaWiki\Revision\RevisionRenderer->combineSlotOutput(MediaWiki\Revision\RenderedRevision, array)
#24 [internal function]: MediaWiki\Revision\RevisionRenderer->MediaWiki\Revision\{closure}(MediaWiki\Revision\RenderedRevision, array)
#25 /var/www/html/w/includes/Revision/RenderedRevision.php(197): call_user_func(Closure, MediaWiki\Revision\RenderedRevision, array)
#26 /var/www/html/w/includes/poolcounter/PoolWorkArticleView.php(137): MediaWiki\Revision\RenderedRevision->getRevisionParserOutput()
#27 /var/www/html/w/includes/poolcounter/PoolCounterWork.php(162): PoolWorkArticleView->doWork()
#28 /var/www/html/w/includes/page/ParserOutputAccess.php(281): PoolCounterWork->execute()
#29 /var/www/html/w/includes/page/Article.php(746): MediaWiki\Page\ParserOutputAccess->getParserOutput(WikiPage, ParserOptions, MediaWiki\Revision\RevisionStoreRecord, integer)
#30 /var/www/html/w/includes/page/Article.php(561): Article->generateContentOutput(User, ParserOptions, integer, OutputPage, array)
#31 /var/www/html/w/includes/actions/ViewAction.php(74): Article->view()
#32 /var/www/html/w/includes/MediaWiki.php(531): ViewAction->show()
#33 /var/www/html/w/includes/MediaWiki.php(315): MediaWiki->performAction(Article, Title)
#34 /var/www/html/w/includes/MediaWiki.php(913): MediaWiki->performRequest()
#35 /var/www/html/w/includes/MediaWiki.php(546): MediaWiki->main()
#36 /var/www/html/w/index.php(53): MediaWiki->run()
#37 /var/www/html/w/index.php(46): wfIndexMain()
#38 {main}
Exception caught inside exception handler: [65f52eb171cb6c6e697e9ed8] /wiki/Special:MyLanguage/Main_Page Error: Call to undefined method GuzzleHttp\Utils::chooseHandler()
Backtrace:
from /var/www/html/w/vendor/guzzlehttp/guzzle/src/functions.php(61)
#0 /var/www/html/w/extensions/Mailgun/vendor/guzzlehttp/guzzle/src/HandlerStack.php(42): GuzzleHttp\choose_handler()
#1 /var/www/html/w/includes/http/GuzzleHttpRequest.php(164): GuzzleHttp\HandlerStack::create(NULL)
#2 /var/www/html/w/includes/filerepo/ForeignAPIRepo.php(531): GuzzleHttpRequest->execute()
#3 /var/www/html/w/includes/filerepo/ForeignAPIRepo.php(575): ForeignAPIRepo::httpGet(string, string, array, NULL)
#4 /var/www/html/w/includes/libs/objectcache/wancache/WANObjectCache.php(1707): ForeignAPIRepo->{closure}(boolean, integer, array, NULL, array)
#5 /var/www/html/w/includes/libs/objectcache/wancache/WANObjectCache.php(1539): WANObjectCache->fetchOrRegenerate(string, integer, Closure, array, array)
#6 /var/www/html/w/includes/filerepo/ForeignAPIRepo.php(585): WANObjectCache->getWithSetCallback(string, integer, Closure, array)
#7 /var/www/html/w/includes/filerepo/ForeignAPIRepo.php(199): ForeignAPIRepo->httpGetCached(string, array)
#8 /var/www/html/w/includes/filerepo/file/ForeignAPIFile.php(65): ForeignAPIRepo->fetchImageQuery(array)
#9 /var/www/html/w/includes/filerepo/FileRepo.php(431): ForeignAPIFile::newFromTitle(Title, ForeignAPIRepo)
#10 /var/www/html/w/includes/filerepo/ForeignAPIRepo.php(115): FileRepo->newFile(Title, boolean)
#11 /var/www/html/w/includes/filerepo/FileRepo.php(471): ForeignAPIRepo->newFile(Title)
#12 /var/www/html/w/includes/filerepo/RepoGroup.php(161): FileRepo->findFile(Title, array)
#13 /var/www/html/w/includes/BadFileLookup.php(71): RepoGroup->findFile(Title)
#14 /var/www/html/w/includes/parser/Parser.php(2616): MediaWiki\BadFileLookup->isBadFile(string, Title)
#15 /var/www/html/w/includes/parser/Parser.php(2379): Parser->handleInternalLinks2(string)
#16 /var/www/html/w/includes/parser/Parser.php(1578): Parser->handleInternalLinks(string)
#17 /var/www/html/w/includes/parser/Parser.php(639): Parser->internalParse(string)
#18 /var/www/html/w/includes/OutputPage.php(2115): Parser->parse(string, Title, ParserOptions, boolean, boolean, integer)
#19 /var/www/html/w/includes/OutputPage.php(2065): OutputPage->parseInternal(string, Title, boolean, boolean)
#20 /var/www/html/w/includes/skins/Skin.php(2035): OutputPage->parseAsInterface(string)
#21 /var/www/html/w/includes/libs/objectcache/wancache/WANObjectCache.php(1707): Skin->{closure}(boolean, integer, array, NULL, array)
#22 /var/www/html/w/includes/libs/objectcache/wancache/WANObjectCache.php(1539): WANObjectCache->fetchOrRegenerate(string, integer, Closure, array, array)
#23 /var/www/html/w/includes/skins/Skin.php(2036): WANObjectCache->getWithSetCallback(string, integer, Closure)
#24 /var/www/html/w/includes/skins/Skin.php(2063): Skin->getCachedNotice(string)
#25 /var/www/html/w/includes/skins/SkinMustache.php(180): Skin->getSiteNotice()
#26 /var/www/html/w/skins/Vector/includes/SkinVector.php(177): SkinMustache->getTemplateData()
#27 /var/www/html/w/includes/skins/SkinMustache.php(136): SkinVector->getTemplateData()
#28 /var/www/html/w/includes/skins/SkinTemplate.php(146): SkinMustache->generateHTML()
#29 /var/www/html/w/includes/OutputPage.php(2634): SkinTemplate->outputPage()
#30 /var/www/html/w/includes/exception/MWExceptionRenderer.php(147): OutputPage->output()
#31 /var/www/html/w/includes/exception/MWExceptionRenderer.php(66): MWExceptionRenderer::reportHTML(Error)
#32 /var/www/html/w/includes/exception/MWExceptionHandler.php(106): MWExceptionRenderer::output(Error, integer)
#33 /var/www/html/w/includes/exception/MWExceptionHandler.php(185): MWExceptionHandler::report(Error)
#34 /var/www/html/w/includes/MediaWiki.php(568): MWExceptionHandler::handleException(Error, string)
#35 /var/www/html/w/index.php(53): MediaWiki->run()
#36 /var/www/html/w/index.php(46): wfIndexMain()
#37 {main}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.