No edit summary |
|||
| 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. === | |||
===== Creation of a new Canasta wiki: ===== | |||
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 | |||
# 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''''' ) | |||
The shutdown and restart is needed to make the previously configured (either implicitly by defaults or explicitly through .env) MySQL root password become active. | |||
You may encounter an issue like I did initially where the site will never initially come online. | |||
In this case use ‘docker logs <container>’ to inspect your MediaWiki container’s goings-on. | |||
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. | |||
==== Upgrading to Open CSP: ==== | |||
# 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: | |||
#db: | |||
web: | |||
image: open-csp:2.0 | |||
#elasticsearch: | |||
caddy: | |||
ports: | |||
- "${PORT:-80}:80" | |||
- "${HTTPS_PORT:-443}:443" | |||
#varnish: | |||
Launch the farm again. | |||
Revision as of 21:36, 20 November 2024
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.
Creation of a new Canasta wiki:
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
- 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 )
The shutdown and restart is needed to make the previously configured (either implicitly by defaults or explicitly through .env) MySQL root password become active.
You may encounter an issue like I did initially where the site will never initially come online. In this case use ‘docker logs <container>’ to inspect your MediaWiki container’s goings-on. 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:-https://localhost}
- 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.
Upgrading to Open CSP:
- 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:
#db:
web:
image: open-csp:2.0
#elasticsearch:
caddy:
ports:
- "${PORT:-80}:80"
- "${HTTPS_PORT:-443}:443"
#varnish:
Launch the farm again.