Docker

From SemanticOrganization
Jump to: navigation, search

Prerequisites

Install docker and docker compose.

Installation

Create a compose.yml file, use this template, change the variables according to your needs:

volumes: 
  db:
  images:
  config:
#  custom:

services:
  semorg:
    image: kollaborat/semorg:1.35
    restart: unless-stopped
    environment: 
      - MYSQL_HOST=db
      - MYSQL_DATABASE=semorg
      - MYSQL_USER=semorg
      - MYSQL_PASSWORD=<YOURDBPASSWORD>
      - MEDIAWIKI_LANG=en
      - MEDIAWIKI_ADMIN_USERNAME=admin
      - MEDIAWIKI_ADMIN_PASSWORD=<YOURADMINPASSWORD>
      - MEDIAWIKI_NAME=<YOURWIKINAME>
      - MEDIAWIKI_SERVER=<YOURSERVER>
#      - MEDIAWIKI_DEBUG=true
#      - MEDIAWIKI_CUSTOM=true
    ports:
      - "8081:80"
    volumes:
      - images:/var/www/html/images
      - config:/var/www/html/config
#      - custom:/var/www/html/extensions/SemanticOrganization/resources/custom
    depends_on:
      - db
    logging:
      options:
        max-size: 50m

  db:
    image: mariadb
    restart: unless-stopped
    volumes:
      - db:/var/lib/mysql
    environment:
      - MARIADB_RANDOM_ROOT_PASSWORD=yes
      - MARIADB_DATABASE=semorg
      - MARIADB_USER=semorg
      - MARIADB_PASSWORD=<YOURDBPASSWORD>
    logging:
      options:
        max-size: 50m

Additional Extensions

The Tweeki skin and the following extensions are included by default:

  • Semantic MediaWiki (via composer)
  • Semantic Result Formats (via composer)
  • Maps (via composer)
  • Page Forms
  • Semantic Organization

To install additional extensions enter the container with docker compose exec semorg bash and create the file /var/www/html/config/EXTENSIONS. Add a line for every extension you would like to include. If the extension is hosted by MediaWiki it's enough to write the name of the extension, if not add the repository URL after a pipe:

SomeOfficialMediaWikiExtension
SomeUnofficialExtension|https://foreign.repo

Upgrading

Update image:

sudo docker compose pull

Update skin and extensions:

  • Tweeki (pull)
  • SemanticOrganization (pull and page import)
  • other extensions (pull)
sudo docker compose exec semorg /update.sh