This guide assumes you have intermediate understanding of docker concepts and basic usage.
docker-compose.yml
docker-compose up -d
As part of the docker-compose up
command, several types of mutable data will be
mounted for you to the running container:
LocalSettings.php
php.ini
images
folder with www-data:www-data
ownershipgc2smw.cfg
These files are expected to be in the location /srv/semawi/
. You can find usable
versions of these files in the mutables
folder distributed with the source.
Please make sure you review the provided configuration files to adapt the system to your needs. Notably, you will want to secure the following settings:
$wgSecretKey
$wgUpgradeKey
$wgServer
In the docker host, you should be able to access the SeMaWi container
now through your browser, with an address like
http://semawi.example.com
. Please note that you must have
entered a correct address for $wgServer$
in the earlier section;
otherwise, all wiki pages appear empty. A default user SeMaWi
(member of groups SysOp and Bureaucrat) has been created for you
with the case-sensitive password SeMaWiSeMaWi
. You should change
this password as your first action in the running system.
Set $wgServer
to the external address of the container like so:
$wgServer="http://semawi.example.com";
You must edit the $wgSMTP
in LocalSettings.php
to reflect where the SMTP server is which SeMaWi can use.
If you're running SeMaWi in production, you will need to edit the line in LocalSettings.php
which looks like enableSemantics( 'localhost' );
, replacing localhost with the domain name you are using.
First make sure you have followed the instructions for configuring the GC2 sync in SeMaWi. That is documented in this file in the section "GeoCloud2 Import Cronjob".
The image has a script /opt/syncgc2.sh
which needs to be called in order to initiate a pull from GC2. You will want the docker host to have a cron job for this purpose. An example of such a command could be:
0 5 * * * docker exec your-container-name /opt/syncgc2.sh
0 6 * * * docker exec your-container-name /usr/bin/php /var/www/wiki/maintenance/runJobs.php
Keep in mind, the cronjob will need sufficient privileges to execute docker commands.
This section describes the process for migrating content from a SeMaWi to a newly established docker container.
When migrating content to a newly deployed docker build, we are essentially moving the wiki. Therefore, we follow the instructions for backing up and updating the wiki, then we re-deploy the SeMaWi XML dump.
maintenance/rebuildall.php
and maintenance/runJobs.php
chown -R www-data:www-data /var/www/wiki/images/
in the docker image (with docker exec) after moving the image directory contents.You will likely want to change your logo. Follow the guidelines here to incorporate your logo.
I recommend you examine the list of Forms to identify which parts of the SeMaWi functionality is required in your case. You can link to the Categories created by these Forms in MediaWiki:Sidebar.
This dockerized version of SeMaWi ships with the Chameleon skin. To activate it, find the line in LocalSettings.php
which says:
$wgDefaultSkin = "vector";
and change it to
$wgDefaultSkin = "chameleon";
There are four settings you need to modify to activate the Mapcentia GeoCloud2 geodata table import into SeMaWi. SeMawi exposes the GC2 sync config in a volume, find it with docker inspect your-container-name
. In this volume you will fine the cfg file, and the following settings need to be set correctly:
When you have done this, you must exec into the container to install the GC2 sync environment:
docker exec -ti name-of-your-running-container /bin/bash
cd /opt/
./installgc2daemon.sh
Having set the integration up, you must instruct the docker host to call the script from the host's cronjob. Refer to the section "Pulling geodata from a GeoCloud2 instance" in this document to see how to do this.
It is strongly recommended you coordinate the time at which the import runs with Mapcentia.