docker
(1)docker-compose
(2)- Whatever else your OS needs for the above (read the docs!). I used Ubuntu 18.04 LTS.
- That squishy stuff between your ears.
- Clone the repo:
git clone https://github.com/securitysavage/savagewiki.git
- Edit
docker-compose.yml
and change the mySQL user and password values. - Edit
savagescript.sql
and modify the database name and username to reflect the changes you made in the yml (if any). - Make sure you are in the same directory as the yml, then run:
docker-compose up -d
(3) - Once it completes, navigate to
localhost:8080
and go through the MediaWiki installation process (documented in the links below). Use the hostname for your database image (my default issavagewiki_database_1:3306
). - When configuration is complete, it will prompt you to save
LocalSettings.php
. Save it to the folder where you cloned this repo, and uncomment line 21 in yourdocker-compose.yml
to telldocker
to mirror your config to the MediaWiki container(4).LocalSettings.example
is included for your reference. - Restart your containers with
docker-compose down
followed bydocker-compose up -d
. - Log in to your wiki with the administrative account you set up during installation, and start populating your wiki. For portability, back up the docker volumes and your
LocalSettings.php
to drop in anywhere you deploy it.
Based on this blog and this one.
(1) Docs for all platforms at https://docs.docker.com/engine/install/, Linux installation walkthrough here.
(2) Docs for all platforms at https://docs.docker.com/compose/install/, Linux installation walkthrough here.
(3) If docker-compose up -d
times out, the command COMPOSE_HTTP_TIMEOUT=200 docker-compose up -d
is a useful workaround (or just retry the command).
(4) For step 6, make sure the hyphen in - ./LocalSettings.php:/var/www/html/LocalSettings.php
lines up with the - mediawiki-www:/var/www/html
entry when you uncomment it, or MediaWiki will not see your configuration.
Tested and working on Ubuntu and MacOS.