If you don't want to use the default port of 8080 and the default mediawiki path of ~/dev/git/gerrit/mediawiki then please just change the .env file for now....
https://docs.docker.com/compose/install/
If you don't want to run the container as root, you will have to add your user to the docker group: https://askubuntu.com/questions/477551/how-can-i-use-docker-without-sudo#477554
git clone https://github.com/addshore/mediawiki-docker-dev.git
From Wikimedia Gerrit:
git clone https://gerrit.wikimedia.org/r/mediawiki/core ~/dev/gerrit/mediawiki
git clone https://gerrit.wikimedia.org/r/mediawiki/skins/Vector ~/dev/gerrit/mediawiki/skins/Vector
Or from Github Mirror (often quicker):
git clone https://github.com/wikimedia/mediawiki.git ~/dev/gerrit/mediawiki
git clone https://github.com/wikimedia/mediawiki-skins-Vector.git ~/dev/gerrit/mediawiki/skins/Vector
# You can then set the remote to point back to gerrit:
git remote set-url origin https://gerrit.wikimedia.org/r/mediawiki/core
git remote set-url origin https://gerrit.wikimedia.org/r/mediawiki/skins/Vector
The .docker/LocalSettings.php file will exist within the containers running Mediawiki.
Make a LocalSettings.php in the root of the Mediawiki repo containing the following:
<?php
require_once __DIR__ . '/.docker/LocalSettings.php';
You will need to check the ./config/local/hosts file and add these to your local hosts file.
You need to populate your hosts file to get the most out of this docker stuff (see above).
To set up the containers:
This includes setting up a default wiki @ https://default.web.mw.local:8080
You can choose the spec of the system that the up command will set up by using a custom .env file called local.env and customizing the variables.
./up
To stop the containers:
Databases persist.
./stop
To restart the containers:
If things have already been setup using up.
./start
To tear down the containers:
Removes databases.
./down
Run commands on the webserver:
If the containers are running you can use the ./bash script to open up a interactive shell on the webserver.
This can be used to run tests, maintenance scripts etc.
./bash
Add a new site:
You can add a new site by name using the ./addsite command
./addsite enwiki
Run tests:
./phpunit --wiki default //var/www/mediawiki/extensions/FileImporter/tests/phpunit
While using PHP you can use remote xdebug debugging.
To do so you need to set IDELOCALHOST in you local.env file to the IP of your local machine (where you run your IDE) as it appears to docker.
xdbeug connecitons will then be sent to this IP address on port 9000.
- FIX HHVM strict mode
- Strict Warning: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function.
- Statsv endpoint
- Setup awesome hosts file additions & removals
- Should be able to run with no internet (so do something about composer install step))