Skip to content

leedshackspace/docker-mediawiki

 
 

Repository files navigation

Mediawiki in a docker container for Leeds Hackspace. This container bakes in the needed set of Mediawiki plugins using composer, and should require no manual setup; just deploy with the required values in the environment variables and go.

This file is out of date, you can help by expanding it

TODO

  • Test automatic deployment
  • Test new compose file

Development

The database credentials are: host db, db wiki, username wiki, password wiki. Once you've downloaded the config file, put it in ./data/config.

Updating

If a mediawiki DB needs an upgrade:

docker-compose exec mediawiki php /var/www/mediawiki/w/maintenance/update.php

And if you're using SMW, you may need to also run extra commands, e.g.:

docker-compose exec mediawiki php /var/www/mediawiki/w/extensions/SemanticMediaWiki/maintenance/updateEntityCountMap.php

Note that if the wiki is in read-only mode ($wgReadOnly), you'll have to disable that, or you'll get a cryptic error.

Config

Short URLs

For short URLs, the appropriate config is:

$wgScriptPath = "/w";
$wgUsePathInfo = true;

If you're exposing the wiki under a subdirectory, set URL_PREFIX in docker-compose.yml, e.g.:

    environment:
      URL_PREFIX: /2018

And update the config to:

$wgScriptPath = "/2018/w";
$wgArticlePath = "/2018/wiki/$1";
$wgUsePathInfo = true;

Email

To send emails, you need to set $wgSMTP:

$wgSMTP = array(
 'host'     => "smtp.host",
 'IDHost'   => "external.domain",
 'port'     => 25,
 'auth'     => false,
);

To use the host machine, set host to either its FQDN or the default gateway of the container. IDHost should match the hostname used in $wgServer.

About

LHS docker container for Mediawiki derived from EMF's

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Languages

  • PHP 80.4%
  • Dockerfile 11.9%
  • Shell 7.7%