I had enough difficulties installing Canasta that I decided I'd write a post on how to do it. Error messages are not exact since I didn't start writing this up until after I got it to a decent state. I'll update this post if anything else breaks.
The cli failed every time and each time it happened I would have to input the fields again. I ran it both on this server and a local one and for both, the packaged caddy gave me issues. But even with caddy working when using the cli installation, I got errors running the custom canasta mediawiki container which has the name web in the docker compose. The cli output gave me errors like
cannot exec in a stopped state
unable to upgrade to tcp received 409
I entered and read the logs and it gave the error about
Folder /mediawiki contains important data and must be mounted to persistent storage
I decided to use the cli to download everything by using it to create the projects and when it inevitably failed I decided to not delete everything. I edited the docker compose override to mount the folder to my filesystem:
services:
#db:
web:
volumes:
- ./extensions:/var/www/mediawiki/w/user-extensions
- ./skins:/var/www/mediawiki/w/user-skins
# - ./config:/mediawiki/config
# - ./images:/mediawiki/images
# - sitemap:/mediawiki/sitemap
- ./mediawiki:/mediawiki
image: ghcr.io/canastawiki/canasta:2.0.1
#elasticsearch:
caddy:
image: alpine:latest
restart: "no"
entrypoint: ["echo", "Caddy is disabled"]
varnish:
ports:
- "YOUR_PORT_HERE:80"
(Caddy gave me enough issues that I disabled it and then exposed the varnish port for my external caddy to use)
This let me do setup. In the setup, it's very important to choose the right database name, which seems to have to be the id you assigned the wiki and which you can find in wikis.yaml. Also try to disable the chameleon skin here when you get to the extensions part, which you can only access by doing the entire installation by choosing
Ask me more questions
instead of
I'm bored already, just install the wiki
After setup, copy the LocalSettings.php to your config folder and not to your mediawiki/config folder. I'm not 100% sure why the config folder is still the important one but I assume it's because the canasta docker compose specifies it.
After that I got an empty page and kept getting 500 series errors. I had to copy the following two lines to the LocalSettings.php to get error messages.
error_reporting( E_ALL );
ini_set( 'display_errors', 1 );
First was the error with chameleon requiring bootstrap that I fixed by disabling the chameleon skin, which you can either do at install or commenting out
// wfLoadSkin( 'chameleon' );
in LocalSettings.php
The next issue that I got was an uncaught exception related to the wikis.yaml file
Fatal error: Uncaught Exception: Error: YOURSITEHERE does not exist in urlToWikiIdMap. in /var/www/mediawiki/w/FarmConfigLoader.php
You have to edit the url in wikis.yaml
After that was the issue with being unable to connect to the database, which I fixed by doing the install again and inputting the correct database name. It's possible that you can edit the wikis.yaml id. Editing the wikis.yaml apparently gives instant changes like the LocalSettings.php.
For some reason even after turning off caddy, when I tried to access the site through the http varnish port, the site got upgraded to https and naturally I couldn't access it. I'm not sure what happened there. I ran it on an outside server and used external caddy to get around that.
I turned off the error reporting and displaying error behavior and now I have a landing page.