MediaWiki-Docker-Dev

MediaWiki-Docker-Dev (or MDD) was a development environment for MediaWiki, based on docker-compose. 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 and read its history here.

In 2021 the original version of mediawiki-docker-dev is discontinued, in favour of a new mwcli tool which will include mediawiki-docker-dev functionality.

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
Using Redis for caching can significantly improve performance. It also enables the ChronologyProtector.

In  add:

In MediaWiki's, add:

The JobQueue can also be made to use Redis. This may improve performance on a production system, but probably makes little difference for a local development setup.

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.