Documentation Download and setup CLI Data structures FAQ About

Canasta: Download and setup

Table of contents

Quick setup

Canasta requires the use of Docker, and then additionally either Docker Compose or Kubernetes as an orchestration framework. For most users, Docker Compose is the best choice; the following instructions are specifically for the use of Docker Compose.

Before starting

You should have both Docker Engine and Docker Compose installed. This is very fast and easy to do on common Linux distributions such as Debian, Ubuntu, Red Hat, and CentOS. By installing Docker Engine from apt or yum, you get Docker Compose along with it. See the following install guides for each OS:

The easiest, and recommended, approach to set up Canasta installations is to use the Canasta CLI (command-line interface). It lets you install and use Canasta without having to know anything about Docker or Docker Compose. Then, once it is installed, the CLI can be used to easily create, import, start, stop, manage extension/skins, and back up Canasta installations.

The following covers the installation, and a few of the commands, of the Canasta CLI. For complete documentation on the CLI, visit the CLI page.

Installation

curl -fsL https://raw.githubusercontent.com/CanastaWiki/Canasta-CLI/main/install.sh | bash

Create a new wiki

Import an existing wiki

Enable/disable an extension

Enable/disable a skin

Manual installation

Import existing wiki

Create new wiki

After installation

There's several things you can do to polish up your wiki so it's ready for use:

Configuration

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:

You can add/modify extensions and skins using the following mount points:

Enabling extensions

In LocalSettings.php you can add an extension by picking its name from our list of bundled extensions and add a cfLoadExtension, e.g.:

cfLoadExtension( 'Cite' );

Enabling skins

In LocalSettings.php you can add a skin by picking its name from our list of bundled skins and add a cfLoadSkin call, e.g.:

cfLoadSkin( 'Timeless' );

Installing 3rd party extensions

In order to install a 3rd party extension, simply place it in the ./extensions directory and add a wfLoadExtension call to ./config/LocalSettings.php, e.g.:

wfLoadExtension( 'MyCustomExtension' );

Composer packages

If a 3rd party extension requires some Composer packages to be installed, just add a line for the extension's composer.json file to the config/composer.local.json file, e.g.:

{
    "extra": {
        "merge-plugin": {
            "include": [
                "user-extensions/SomeExtension/composer.json"
            ]
        }
    }
}

Note: the require section of config/composer.local.json is ignored; thus you won't be able to install new extensions via Composer, only dependencies.

Installing 3rd party skins

In order to install a 3rd party skin, simply place it in the ./skins directory and add a wfLoadSkin call to ./config/LocalSettings.php, e.g.:

wfLoadSkin( 'MyCustomSkin' );

Kubernetes

Canasta offers Kubernetes support for heavy-duty wikis needing the power provided by Kubernetes. However, it is not for the faint of heart. We recommend smaller wikis use Docker Compose to manage their stack.

To use Kubernetes, first make sure you have a Kubernetes cluster ready, and that Kubectl works.

Then, clone the repository:

git clone https://github.com/CanastaWiki/Canasta-Kubernetes

Make necessary changes to the .env file and the files in the config and settings directory, and then call the following:

./start.sh