A containerised solution for deploying a MediaWiki instance customised for SCA combat rules.
If you don't already have it
docker build -t sca-rules-wiki:latest mediawiki/
docker build -t sca-rules-db:latest database/
This is a dir to persist database dumps and image files.
There is a basic / example context dir included in this repository (dev_environment/context/
). It provides a minimum wiki setup.
This isn't intended to significant use - just for familiarisation.
If you're going to be actually running this, copy context/ to a location outside the repository.
Advanced note: it's also possible to bootstrap the DB content from scratch. Details below
cd dev_environment
cp example.env .env
Edit .env
in your favourite editor, and make any tweaks to it that you prefer.
docker compose up
Note: The included docker-compose file overrides the scripts directory in the containers with the local mediawiki/bin
and database/bin
directories. So you can edit these files and see the effects of your changes immediately in your running containers (without needing to rebuild the containers).
Go to http://localhost
from your preferred web browser
Log in; the default user name is Admin
, password Admin
(you'll get prompted to change this to a password that sucks less on first login)
For the containers to stand up correctly, they need the following environment (all of this is provided in the dev_environment/
directory with the included docker-compose.yml
, its associated .env
file, and this repo's context/
directory - this is for documentation purposes):
- sca-rules-wiki
- Environment variables set on container:
- SITE_NAME
- BASE_URL
- WIKI_EMAIL
- DB_URL
- DB_NAME
- DB_USER
- DB_PASSWORD
- DB_SECRET_KEY
- DB_UPGRADE_KEY
- BACKUPS_LOCATION
- Volumes
- An appropriate
LocalSettings.php
file mounted at/var/www/html/LocalSettings.php
- A directory mounted at
/image_backups
to optionally initialise/var/www/html/images
from, and to periodically back the contents of/var/www/html/images
up into.
- An appropriate
- Environment variables set on container:
- sca-rules-db
- Environment variables set on container:
- DB_NAME
- MYSQL_USER
- MYSQL_PASSWORD
- MYSQL_ROOT_PASSWORD
- BACKUPS_LOCATION
- Volumes
- A directory mounted at
/db_backups
to initialise the database from, and to back up the datbase to. This needs to contain a valid mysql dump (for the moment; this will hopefully change).
- A directory mounted at
- Environment variables set on container:
Um, like, ping me, I guess
(These are notes to self)
- run docker-compose from bootstrap directory
- load mediawiki, jump through setup hoops
- run
scripts/backup.sh