Community Compendium of Tech
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Canasta Install Guide/Experience

    Scheduled Pinned Locked Moved
    Software
    1
    2
    81
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M
      myriads
      last edited by myriads

      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.

      M 1 Reply Last reply Reply Quote 0
      • M
        myriads @myriads
        last edited by myriads

        I later tried to install the CreateWiki and ManageWiki extensions of miraheze. Canasta is on version 1.39 of mediawiki while both of those extensions require 1.42. I cloned the repos, then checked out to some commits from approximately February 2024 (I chose the exact commits based on extension.json's commit history). Then I copied them to the extension folder that mapped to the canasta docker extension folder.

        Unfortunately, enabling those two extensions creates an error with the database when you try running update.php, which I assume is due to miraheze's custom database schema.

        Error 1046: No database selected
        Function: Wikimedia\Rdbms\Database::select
        Query: SELECT  wiki_dbcluster,wiki_dbname,wiki_deleted,wiki_url,wiki_sitename  FROM `cw_wikis`
        

        I checked and ManageWiki does check if CreateWiki is active. There's recent commits that change the sql that I assume gets executed when you update, so if you were desperate to try it out with Canasta, you could create a branch from the February commits, then try to either manually edit the sql or try cherry picking.

        I later figured out one of the changes I wanted to make was dependent on wikis.yaml. I'm giving up on these two extensions.

        1 Reply Last reply Reply Quote 0
        • First post
          Last post