/MediaWiki-VisualEditor-Docker

Mediawiki + Parsoid + VisualEditor single-container bundle

Primary LanguageDockerfileMIT LicenseMIT

MediaWiki Docker Image (with Parsoid & VisualEditor)

Based on MediaWiki release 1.32.1.

Requires Docker version 1.11.2 and up

The image is built and uploaded to Docker Hub.

Installed extensions (23 in total):

Usage

The image contains everything required to start a new wiki bundled with the popular VisualEditor extension. It doesn't contain a database, allowing the user to add whatever database he requires to the platform via docker-compose.

Simple image usage

If you already have a database instance you wish to use, you can just run the wiki using the following Docker command:

docker run -d -p 80:80 revianlabs/mediawiki-ve-bundle

Persisting data

If you plan to use this in a production environment, it is highly recommended to use a Docker volume for data persistency as follows:

docker run -d -p 80:80 -v ${PWD}:/var/www/html revianlabs/mediawiki-ve-bundle

Docker Compose usage

Download the docker-compose.yml file from this repository:

version: '2'
services:
  mariadb:
    image: 'mariadb:10.4.4'
    environment:
      - MYSQL_ROOT_PASSWORD=root_pwd
      - MYSQL_USER=mysql_user
      - MYSQL_PASSWORD=mysql_pwd
      - MYSQL_DATABASE=mysql_database
    volumes:
      - 'mariadb_data:/var/lib/mysql'
  mediawiki:
    image: 'revianlabs/mediawiki-ve-bundle'
    ports:
      - '8000:80'
    volumes:
      - 'mediawiki_data:/var/www/html'
      - 'parsoid_data:/usr/lib/parsoid'
    depends_on:
      - mariadb
volumes:
  mariadb_data:
    driver: local
  mediawiki_data:
    driver: local
    driver_opts:
      type: 'none'
      o: 'bind'
      device: '/var/www/mediawiki_data'
  parsoid_data:
    driver: local
    driver_opts:
      type: 'none'
      o: 'bind'
      device: '/var/www/parsoid_data'

After that, run docker-compose up -d to start the services.

Open http://0.0.0.0/ or http://127.0.0.1 in your browser, and proceed with the setup process.

❗ During the setup process, when asked for the Database configuration, be sure you use mariadb instead of localhost for the database connection URL.

Upgrade

If you want to use a newer version of images, pull the corresponding image and change image tag in docker-compose.yml. After that, restart the container:

$ docker-compose up -d --no-deps mediawiki

If database migration is needed, run the upgrade.php script:

$ docker-compose exec mediawiki php /var/www/html/maintenance/update.php

Extensions

Adding extensions is trivial if you're using Docker volumes. Just copy the directory containing the extension into MediaWiki's extensions directory, which can be found in the root of the mapped volume.

License

MIT License