Sign inSign up

tfwiki/mediawiki

By tfwiki

•Updated over 5 years ago

The MediaWiki code powering the Team Fortress Wiki

Image
0

50K+

tfwiki/mediawiki repository overview

Docker Automated build Docker Build Status

⁠Team Fortress Wiki

This repository is a clone from the production repository hosted on Valve's servers. It is in the process of being cleaned up and simplified into a set of Dockerfiles and supporting files, which can be used to reliably build an almost like-for-like reproduction of the Valve-hosted Team Fortress Wiki.

The key differences between the image built by these Dockerfiles and the Valve-hosted site are:

  • This repository runs PHP 5.6
  • ...

⁠Running locally

The wiki can be ran locally via docker-compose:

  • Build a tfwiki/mediawiki:local image from source: make
  • Update your hosts file to map tfwiki.localhost to the host IP (presumably 127.0.0.1)
  • Create .env file with the variables to configure your stack (cp .env.example .env; .env.example is pre-configured for running locally)
  • Generate some self-signed SSL certs: make certs
  • Bring up the stack! docker-compose up -d
⁠MediaWiki

For the first Dockerised build, we want to match (as closely as we can) to the Valve-hosted files, although with a cleaner repository.

MediaWiki do not publish a docker image for the version of MediaWiki we require (v1.26.2), so we have a fork of their repository⁠ building that image, which is published to tfwiki/mediawiki:base-1.26.2.

Once we have the entire site running via Docker, we'll then upgrading MediaWiki.

⁠TF Wiki

Dockerfile is responsible for the actual build of the TF Wiki. This Dockerfile moves MediaWiki's files to match the production TF Wiki's directory structure, and then we're adding our extensions, and necessary supporting files to configure the Docker container at runtime.

We can configure this tfwiki/mediawiki container with the following environmental variables:

VariableDefaultAssociated MediaWiki variableNotes
CAPTCHA_SECRETRequired$wgCaptchaSecret
DB_DBwiki$wgDBname
DB_HOSTdb$wgDBserver
DB_PASSWORD–$wgDBpassword
DB_TYPEmysql$wgDBtype
DB_USERwiki$wgDBuser
EMAIL_EMERGENCY_CONTACTRequired with SMTP_*$wgEmergencyContact
EMAIL_PASSWORD_SENDER Required with SMTP_*$wgPasswordSender
SENTRY_DSN-Used to report errors to Sentry⁠
SMTP_HOST-$wgSMTP['Host']
SMTP_IDHOST-$wgSMTP['IDHost']
SMTP_PORT-$wgSMTP['port']
SMTP_AUTH-$wgSMTP['auth']
SMTP_USERNAME-$wgSMTP['username']
SMTP_PASSWORD-$wgSMTP['password']
MEMCACHED_HOST$wgMemCachedServersCan declare CSV. If this is blank we'll use MediaWiki's default cache settings
SECRET_KEYRequired$wgSecretKey
SERVER_URLRequired$wgServer
SITENAMETeam Fortress Wiki$wgSitename
STEAM_API_KEYN/A
VARNISH_HOSTvarnish$wgSquidServersCan declare CSV. If this is blank and Varnish is used, MediaWiki won't purge items from the cache
`TRUSTED_PROXIESwiki.teamfortress.com,10.138.0.0/24$wgSquidServersNoPurgeCan declare CSV. Make sure MediaWiki can properly resolve IP addresses through external load balancers

Tag summary

Content type

Image

Digest

Size

327.7 MB

Last updated

over 5 years ago

docker pull tfwiki/mediawiki:1.31-tfwiki6