m (Removed spelling error for "likeg")
Line 1: Line 1:
Getting this running is a two-step process, not including preparation of a docker host with all the prereqs that come with that.
 
  
=== First of all we’ll create a new Canasta wiki, and then upgrade it to Open CSP. ===
+
This projects aims to integrate Open-CSP 2.0 into CanastaWiki. 
  
===== Creation of a new Canasta wiki: =====
+
## Getting started
For this we’ll use Canasta-DockerCompose.
 
  
# Clone the Canasta-DockerCompose repo, master branch. It can be found here : https://github.com/CanastaWiki/Canasta-DockerCompose
+
Clone the project and the Docker Compose companion project
# Copy the .env.example file to .env (optional; to override default values)
 
# Alter .env as needed (refer to https://canasta.wiki/other-maintenance/#configuration )
 
# Launch instance ( In your console you to the downloaded files and inside the main folder run : '''''docker-compose up -d''''' )
 
# Wait for the database container to become responsive
 
# Restart everything ( run '''''docker-compose down''''', then '''''docker-compose up -d''''' again )
 
# Navigate to your webpage (localhost in your web browser on the docker host)
 
# Follow the MediaWiki installation steps to install your version of MediaWiki
 
# Copy the downloaded LocalSettings.php to <where you installed the download rep in step 1>/config/ on the host
 
# Shut down Canasta instance ( run '''''docker-compose down''''' )
 
  
 +
[[User:Fd4138e7-8b46-4c8f-99bf-d4b738ebc295|Fd4138e7-8b46-4c8f-99bf-d4b738ebc295]] ([[User talk:Fd4138e7-8b46-4c8f-99bf-d4b738ebc295|talk]])bash 
 +
  git clone https://github.com/LarsS88/Canasta_OpenCSP.git
 +
[[User:Fd4138e7-8b46-4c8f-99bf-d4b738ebc295|Fd4138e7-8b46-4c8f-99bf-d4b738ebc295]] ([[User talk:Fd4138e7-8b46-4c8f-99bf-d4b738ebc295|talk]])
  
The shutdown and restart is needed to make the previously configured (either implicitly by defaults or explicitly through .env) MySQL root password become active.
+
[[User:Fd4138e7-8b46-4c8f-99bf-d4b738ebc295|Fd4138e7-8b46-4c8f-99bf-d4b738ebc295]] ([[User talk:Fd4138e7-8b46-4c8f-99bf-d4b738ebc295|talk]])bash  
  You may encounter an issue like I did initially where the site will never come online.
+
  git clone https://github.com/LarsS88/Canasta-DockerCompose.git
In this case use ‘docker logs <container>’ to inspect your MediaWiki container’s goings-on.
+
[[User:Fd4138e7-8b46-4c8f-99bf-d4b738ebc295|Fd4138e7-8b46-4c8f-99bf-d4b738ebc295]] ([[User talk:Fd4138e7-8b46-4c8f-99bf-d4b738ebc295|talk]])
It may report that it cannot access files directly under the “/mediawiki/”, in which case shut it down and edit docker-compose.yml as follows:
 
 
Under services → web → volumes, at the top, add: - ./mediawiki:/mediawiki
 
 
It should then look something like:
 
  
web:
+
---
    image: ghcr.io/canastawiki/canasta:latest
 
    restart: unless-stopped
 
    extra_hosts:
 
      - "gateway.docker.internal:host-gateway"
 
    depends_on:
 
      - db
 
      - elasticsearch
 
    environment:
 
      # Sourced from .env
 
      - MW_SITE_SERVER=${MW_SITE_SERVER:-<nowiki>https://localhost}</nowiki>
 
      - PHP_UPLOAD_MAX_FILESIZE=${PHP_UPLOAD_MAX_FILESIZE:-10M}
 
      - PHP_POST_MAX_SIZE=${PHP_UPLOAD_MAX_FILESIZE:-10M}
 
      - PHP_MAX_INPUT_VARS=${PHP_MAX_INPUT_VARS:-1000}
 
      - MW_SITEMAP_SUBDIR
 
      - MW_SITEMAP_IDENTIFIER
 
    volumes:
 
      '''- ./mediawiki:/mediawiki'''
 
      - ./extensions:/var/www/mediawiki/w/user-extensions
 
      - ./skins:/var/www/mediawiki/w/user-skins
 
      - ./config:/mediawiki/config
 
      - ./images:/mediawiki/images
 
      - sitemap:/mediawiki/sitemap
 
  
  Then spin the farm up again.
+
Go to the project directory  
  
==== Upgrading to Open CSP: ====
+
[[User:Fd4138e7-8b46-4c8f-99bf-d4b738ebc295|Fd4138e7-8b46-4c8f-99bf-d4b738ebc295]] ([[User talk:Fd4138e7-8b46-4c8f-99bf-d4b738ebc295|talk]])bash 
 +
  cd Canasta_OpenCSP
 +
[[User:Fd4138e7-8b46-4c8f-99bf-d4b738ebc295|Fd4138e7-8b46-4c8f-99bf-d4b738ebc295]] ([[User talk:Fd4138e7-8b46-4c8f-99bf-d4b738ebc295|talk]])
  
# Clone the Canasta-OpenCSP fork, master branch. ( this can be found here : https://github.com/LarsS88/opencsp2-canasta, you can simply download and unzip )
+
---
# Build the image with a tag such as ‘open-csp:2.0’ for instance. ( inside the main folder that you have just downloaded, type '''''docker build --tag open-csp:2.0 .''''' ( do not forget the . at the end )
 
# Go back to your Canasta-DockerCompose repo and edit ''docker-compose.override.yml''
 
# Uncomment “web” and its “image” property.
 
# Set the image to your locally built Canasta-OpenCSP tag.  It should look something like this :
 
  
  services:
+
Build the image  
  #db:
+
 
    web:
+
[[User:Fd4138e7-8b46-4c8f-99bf-d4b738ebc295|Fd4138e7-8b46-4c8f-99bf-d4b738ebc295]] ([[User talk:Fd4138e7-8b46-4c8f-99bf-d4b738ebc295|talk]])bash 
      image: open-csp:2.0
+
  docker build . -t canasta-opencsp:2.0
    #elasticsearch:
+
[[User:Fd4138e7-8b46-4c8f-99bf-d4b738ebc295|Fd4138e7-8b46-4c8f-99bf-d4b738ebc295]] ([[User talk:Fd4138e7-8b46-4c8f-99bf-d4b738ebc295|talk]])
    caddy:
+
 
        ports:
+
---
       - "${PORT:-80}:80"
+
 
        - "${HTTPS_PORT:-443}:443"
+
Change to the other project folder  
    #varnish:
+
 
Launch the farm again.
+
[[User:Fd4138e7-8b46-4c8f-99bf-d4b738ebc295|Fd4138e7-8b46-4c8f-99bf-d4b738ebc295]] ([[User talk:Fd4138e7-8b46-4c8f-99bf-d4b738ebc295|talk]])bash 
 +
   cd ../Canasta-DockerCompose
 +
[[User:Fd4138e7-8b46-4c8f-99bf-d4b738ebc295|Fd4138e7-8b46-4c8f-99bf-d4b738ebc295]] ([[User talk:Fd4138e7-8b46-4c8f-99bf-d4b738ebc295|talk]])
 +
 
 +
---
 +
 
 +
Start the Canasta stack
 +
 
 +
<mark>NOTE: If, in the build step, you tagged the image differently from how I specified it above, you will need to alter this docker-compose.override.yml file as well at before you try to spin up Canasta.</mark>
 +
 
 +
[[User:Fd4138e7-8b46-4c8f-99bf-d4b738ebc295|Fd4138e7-8b46-4c8f-99bf-d4b738ebc295]] ([[User talk:Fd4138e7-8b46-4c8f-99bf-d4b738ebc295|talk]])bash  
 +
  docker-compose up -d
 +
[[User:Fd4138e7-8b46-4c8f-99bf-d4b738ebc295|Fd4138e7-8b46-4c8f-99bf-d4b738ebc295]] ([[User talk:Fd4138e7-8b46-4c8f-99bf-d4b738ebc295|talk]])
 +
 
 +
---
 +
 
 +
Install a wiki
 +
 
 +
`Navigate to https://localhost and follow the installation steps`
 +
 
 +
---
 +
 
 +
Copy the now downloaded LocalSettings.php to the config subdir
 +
 
 +
[[User:Fd4138e7-8b46-4c8f-99bf-d4b738ebc295|Fd4138e7-8b46-4c8f-99bf-d4b738ebc295]] ([[User talk:Fd4138e7-8b46-4c8f-99bf-d4b738ebc295|talk]])bash  
 +
   cp <browser download folder>/LocalSettings.php config/
 +
[[User:Fd4138e7-8b46-4c8f-99bf-d4b738ebc295|Fd4138e7-8b46-4c8f-99bf-d4b738ebc295]] ([[User talk:Fd4138e7-8b46-4c8f-99bf-d4b738ebc295|talk]])
 +
 
 +
---
 +
 
 +
Restart the stack
 +
 
 +
[[User:Fd4138e7-8b46-4c8f-99bf-d4b738ebc295|Fd4138e7-8b46-4c8f-99bf-d4b738ebc295]] ([[User talk:Fd4138e7-8b46-4c8f-99bf-d4b738ebc295|talk]])bash 
 +
  docker-compose down
 +
   docker-compose up -d
 +
[[User:Fd4138e7-8b46-4c8f-99bf-d4b738ebc295|Fd4138e7-8b46-4c8f-99bf-d4b738ebc295]] ([[User talk:Fd4138e7-8b46-4c8f-99bf-d4b738ebc295|talk]])
 +
 
 +
---
 +
 
 +
**OPTIONAL:**
 +
Follow the Open-CSP installation progress
 +
 
 +
[[User:Fd4138e7-8b46-4c8f-99bf-d4b738ebc295|Fd4138e7-8b46-4c8f-99bf-d4b738ebc295]] ([[User talk:Fd4138e7-8b46-4c8f-99bf-d4b738ebc295|talk]])bash  
 +
  docker logs <web container name> --follow
 +
[[User:Fd4138e7-8b46-4c8f-99bf-d4b738ebc295|Fd4138e7-8b46-4c8f-99bf-d4b738ebc295]] ([[User talk:Fd4138e7-8b46-4c8f-99bf-d4b738ebc295|talk]])
 +
<mark>If you're just running the one Canasta instance it'll be canasta-dockercompose_web_1. Otherwise you can use 'docker ps' to find it.</mark>
 +
 
 +
---
 +
 
 +
You're done. 🥳
 +
Visit your site.

Revision as of 11:58, 25 April 2025

This projects aims to integrate Open-CSP 2.0 into CanastaWiki.

    1. Getting started

Clone the project and the Docker Compose companion project

Charlot Cobben (talk)bash

 git clone https://github.com/LarsS88/Canasta_OpenCSP.git

Charlot Cobben (talk)

Charlot Cobben (talk)bash

 git clone https://github.com/LarsS88/Canasta-DockerCompose.git

Charlot Cobben (talk)

---

Go to the project directory

Charlot Cobben (talk)bash

 cd Canasta_OpenCSP

Charlot Cobben (talk)

---

Build the image

Charlot Cobben (talk)bash

 docker build . -t canasta-opencsp:2.0

Charlot Cobben (talk)

---

Change to the other project folder

Charlot Cobben (talk)bash

 cd ../Canasta-DockerCompose

Charlot Cobben (talk)

---

Start the Canasta stack

NOTE: If, in the build step, you tagged the image differently from how I specified it above, you will need to alter this docker-compose.override.yml file as well at before you try to spin up Canasta.

Charlot Cobben (talk)bash

 docker-compose up -d

Charlot Cobben (talk)

---

Install a wiki

`Navigate to https://localhost and follow the installation steps`

---

Copy the now downloaded LocalSettings.php to the config subdir

Charlot Cobben (talk)bash

 cp <browser download folder>/LocalSettings.php config/

Charlot Cobben (talk)

---

Restart the stack

Charlot Cobben (talk)bash

 docker-compose down
 docker-compose up -d

Charlot Cobben (talk)

---

    • OPTIONAL:**

Follow the Open-CSP installation progress

Charlot Cobben (talk)bash

 docker logs <web container name> --follow

Charlot Cobben (talk) If you're just running the one Canasta instance it'll be canasta-dockercompose_web_1. Otherwise you can use 'docker ps' to find it.

---

You're done. 🥳 Visit your site.