MediaWiki-Docker-Dev

MediaWiki-Docker-Dev (or MDD) is a development environment for MediaWiki, based on Docker. It was authored by Addshore, with contributions from others. It can be installed from GitHub, and you can find instructions for setup in the README.

Adjusting database replication delay
This is very useful for reproducing production bugs caused by replication delay.

First, connect to the replica database:

Then execute this SQL to set the delay to 2 seconds.

The output should show

Log to STDERR
With this configuration, you can view MediaWiki's logs by running, or   to view only error messages.

Improve file system sync on macOS
Docker for Mac users may notice a performance improvement by adjusting  so that the   section under   has   set:

Profiling with Tideways XHProf extension
If you want to Manual:Profiling your code, you can do something like this:


 * 1) Execute   so you are in the web container.
 * 2) Then clone the Tidways XHProf extension into your  directory:
 * 3) Build the extension:
 * 4) Enable the extension:
 * 5) Restart php-fpm:

Then in  you can have a configure like: Then, you can clone the XHProf viewer and copy its   and   directories into the root of your MediaWiki repo (doesn't matter if you do this on the host or in the container, since the files will sync across). From there you can navigate to http://default.web.mw.localhost/mediawiki/xhprof_html/ to view profiled requests.

EventLogging

 * 1) Clone the eventlogging repository
 * 2) Run  . (Optional) If you have jq installed, you can run   for improved formatting of the JSON output.

In Docker for Mac, add this to your :

Redis
In  add:

In MediaWiki's, add:

Parsoid / VisualEditor
See https://github.com/addshore/mediawiki-docker-dev/pull/83 for how to running Parsoid as a service locally.

Alternatively, you can use the approach from boxwiki:

ElasticSearch
In  add:

Then follow the installation and configuration instructions from Extension:CirrusSearch, taking care to specify the hostname as  rather than.