The following are some of the other options available for configuring and maintaining a Canasta wiki or wiki farm.
Canasta relies on setting environment variables in the Docker container for controlling
aspects of the system that are outside the purview of LocalSettings.php. You can change
these options by editing the .env
file; see .env.example
for details:
PORT
- modify the publicly-accessible HTTP port, default is 80
MYSQL_PASSWORD
- modify MySQL container root
user password, default is mediawiki
(use it when installing the wiki via wizard)PHP_UPLOAD_MAX_FILESIZE
- php.ini upload max file sizePHP_POST_MAX_SIZE
- php.ini post max sizeYou can add/modify extensions and skins using the following mount points:
./config
- persistent bind-mount which stores the LocalSettings.php
file,
volumed in as mediawiki/config/LocalSettings.php -> /var/www/mediawiki/w/LocalSettings.php
./images
- persistent bind-mount which stores the wiki images,MediaWiki contains over 200 maintenance scripts in its maintenance\
directory; you can see the full list here.
These scripts cover everything from actions like changing users' passwords and importing a batch of images, to much more obscure tasks like testing the MediaWiki parser.
There is a reasonable chance that you will never need to run a maintenance script while using Canasta. The most important maintenance script is update.php
, but it is run during the container startup process, so if you need to run it, you can always get it to run simply by calling the canasta restart
command.
As for runJobs.php
, another popular maintenance script, the job queue is always automatically run during the entire life of the container.
However, in case you do want to run a MediaWiki maintenance script, you can call the following:
sudo canasta maintenance "SCRIPT_NAME.php"
The quotation marks are there so that you can pass in flags to the script, and not have the canasta maintenance
command think that these are its own flags. For instance, to create a new "WikiSysop" administrator account, with password "VerySecurePassw0rd", you could call the following:
sudo canasta maintenance "createAndPromote.php WikiSysop VerySecurePassw0rd --bureaucrat --sysop"
restic is a very useful utility for doing automated backups to a variety of different storage types; though Canasta's usage of restic is configured for using AWS S3-based repositories.
Canasta makes use of restic's dockerized binary.
.env
file. Follow the steps at cli-configure-quickstart to obtain ACCESS_KEY_ID and SECRET_ACESS_KEY.AWS_S3_API=s3.amazonaws.com
AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_S3_BUCKET=
RESTIC_PASSWORD=
.env
file:sudo canata restic init -i canastaId
Now you should be able to use any of the available commands.
check Check restic snapshots
diff Show difference between two snapshots
forget Forget restic snapshots
init Initialize a restic repo
list List files in a snapshost
restore Restore restic snapshot
take-snapshot Take restic snapshots
unlock Remove locks other processes created
view View restic snapshots
Use "sudo canasta restic [command] --help" for more information about a command.
/etc/canasta/
folder.conf.json
file is as follows:{
"Installations": {
"wiki1": {
"Id": "wiki1",
"Path": "/home/user/wiki1",
"Orchestrator": "compose"
},
"wiki2": {
"Id": "wiki2",
"Path": "/home/user/canasta/wiki2",
"Orchestrator": "compose"
}
}
}
Installations
there is the list of installations that the CLI currently manages.compose
plugin is the only orchestrator supported by the CLI)sudo rm /usr/local/bin/canasta && sudo rm /etc/canasta/conf.json