Changes

Jump to navigation Jump to search
1,822 bytes added ,  08:41, 27 March 2023
More additions to an overview document
Canasta Quick links
=== Communication ===
<ol>
<li> https://groups.google.com/g/canasta-wiki
@todo Combine this page, and Jeffrey's post into documentation on the wiki / Canasta project
=== Repos ===There are four main code repositories for the Canasta Project as a whole.<ol><li>'''Canasta''' - this is the [https://github.com/CanastaWiki/Canasta/blob/master/Dockerfile Dockerfile] for MediaWiki alone. Based on Debian, it sets up the basic Linux environment by adding things like Apache, Composer, [https://marlam.de/msmtp/ Msmtp] and tools (git, vim, mc); downloads the proper version of MediaWiki, extension and skins based on the Release plus a specific SHA for each package (reproducible builds - no accidental drift). Installs everything and [https://github.com/CanastaWiki/Canasta/tree/master/_sources/configs configures] everything like Apache, PHP, Varnish cache, and copies composer.canasta.json as composer.local.json. This repo also patches core so that the MediaWiki Installer installs the Bootstrap skin if the user has Chameleon selected as a skin (default). Bootstrap is a requirement of Chameleon, and the user would receive an error the dependency were not met. The Dockerfile [https://github.com/CanastaWiki/Canasta/blob/master/Dockerfile#L549-L562 alters all the Composer autoload files] to use 'canasta-extensions' rather than 'extensions'. That is because the included extensions and skins get included with the image, while user-added extensions and skins get volumed in to the running container in the standard 'extensions' and 'skins' directories. The standard MediaWiki 'images' and 'cache' directories are moved from the image to the volume mount $MW_ORIGIN_FILES. All [https://github.com/CanastaWiki/Canasta/blob/master/Dockerfile#L575 git artifacts are removed from the image]. It creates a sort of manifest list of installed extensions and skins, with commented lines that can later be enabled simply by removing the comment. (Vector gets enabled by default). In the final build phase, the _sources/configs get copied into /etc/ or $WWW_ROOT to setup email (msmtp), apache, php; scripts got into / or ./maintenance; .htaccess, favicon, robots.txt into $WWW_ROOT. Canasta places 3 settings files into $MW_HOME:<ol><li>CanastaUtils.php - where deprecated cfLoadExtension() and cfLoadSkin() are defined/intercepted; and a handy sitenotice is displayed, only for Special Pages where email is used, and only if email is not setup.<li>LocalSettings.php - which provides the familiar / canonical MediaWiki settings file and just does a <syntaxhighlight lang="php">require_once "$IP/CanastaDefaultSettings.php";</syntaxhighlight><li>CanastaDefaultSettings.php - a customized LocalSettings.php, not a replacement of MediaWiki's DefaultSettings.php <br /></ol>if <syntaxhighlight lang="php">getenv( 'MW_VOLUME' ) . '/config/LocalSettings.php'</syntaxhighlight> doesn't exist, then all variables are unset and we mimic <code>wfWebStartNoLocalSettings()</code> getMediawikiSettings.php is a maintenance class script used in web installer setup. Note: Canasta currently uses the Apache Multi-Processing Module (MPM) '''[https://httpd.apache.org/docs/2.4/mod/prefork.html Prefork]''' (not worker) '''a non-threaded, pre-forking web server'''. Each server process may answer incoming requests, and a parent process manages the size of the server pool. It is appropriate for sites that need to avoid threading for compatibility with non-thread-safe libraries. Canasta's DefaultSettings.php also sets the proxy services for Docker networks, and lastly includes all files in MW_VOLUME . '/config/settings/*.php' The Apache site configuration is named [https://github.com/CanastaWiki/Canasta/blob/master/_sources/configs/mediawiki.conf mediawiki.conf]
# The <li>'''Canasta repo - this is DockerCompose''' - uses the image created from #1 as the [https://github.com/CanastaWiki/Canasta/blob/master/Dockerfile Dockerfile] basis for MediaWiki alone. Based on Debiana full working setup, it sets up the basic Linux environment by adding things like Apachewith services for web, Composerdb, [https://marlam.de/msmtp/ Msmtp] and tools (gitelasticsearch, vimcaddy, mc); downloads the proper version of MediaWiki, extension and skins based on the Release plus varnish. Although Caddy is a specific SHA for each package (reproducible builds - no accidental drift). Installs everything and [https://github.com/CanastaWiki/Canasta/tree/master/_sources/configs configures] everything like Apacheweb server, PHP, Varnish cache, and copies composer.canasta.json as composer.local.json. This repo also patches core so that the MediaWiki Installer installs the Bootstrap skin if the user has Chameleon selected it is used as a skin (default). Bootstrap is a requirement of Chameleonreverse proxy, and the user would receive an error the dependency were not metis incredibly lightweight. The Dockerfile [https://githubweb service (MediaWiki) relies on Apache.com/CanastaWiki/Canasta/blob/master/Dockerfile#L549-L562 alters all the Composer autoload files] to use <li>'canasta-extensions' rather than 'extensions'. That is because the included extensions and skins get included with the image, while userCanasta-added extensions and skins get volumed in to the running container in the standard CLI'extensions' and 'skins' directories. The standard MediaWiki 'images' and 'cache' directories are moved from the image to the volume mount $MW_ORIGIN_FILES. All [https://github.com/CanastaWiki/- Canasta/blob/master/Dockerfile#L575 git artifacts are removed from the image]. It creates has a sort of manifest list of installed extensions and skinsCLI, written in Go, with commented lines that can later be enabled simply by removing the comment. (Vector gets enabled by default). In the final build phase, the _sources/configs get copied into /etc/ or $WWW_ROOT allows you to setup email (msmtp), apache, php; scripts got into / or ./maintenance. There are 3 manipulate and administer all your Canasta settings files:## CanastaUtils.php - where deprecated cfLoadExtension() and cfLoadSkin() are defined/intercepted; and a handy sitenotice is displayed, only for Special Pages where email is used, and only if email is not setupinstallations.## CanastaLocalSettings.php - which just does a <syntaxhighlight lang="php"li>require_once "$IP/CanastaDefaultSettings'''Canasta-Documentation''' - because good code deserves good documentation.php";</syntaxhighlight>## <br /ol>
==Getting Started on Windows==
*pin to quick access can put your Ubuntu filesystem in your Windows Explorer quick access
== Creating a wiki ==
There are two basic approaches:
# Use the [https://canasta.wiki/cli/ Canasta CLI]. The Canasta CLI is a command-line tool written in Go that offers simple commands to create, delete and manage your Canasta installations# Use the Canasta "stack repo" directly. The Stack Repo is the Docker-based setup that the CLI interfaces with. If you would rather just work with Docker directly, you can use the stack repo.
<br />
== Canasta CLI ==
<pre>
A CLI tool to create, import, start, stop and backup multiple Canasta installations

Navigation menu